word count problem:
input: hello world welcome to python world
output:
hello: 1
world: 2
welcome: 1
to: 1
python: 1
input = "hello world welcome to python world" for i in set(input.split(" ")): print(f"{i}: {input.count(i)}")
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment