Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = ' aa, df, fv, aa'
- l = list(s.split(','))
- print (l)
- words_dict = dict()
- for word in l:
- if word in words_dict:
- words_dict[word] = words_dict[word] + 1
- else:
- words_dict[word] = 1
- print(words_dict)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement