Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def word_count(sentence):
  2.     split_sentence = sentence.split()
  3.     results = []
  4.     for i in split_sentence:
  5.         print((i) + str(' :') + str(split_sentence.count(i)))
  6.  
  7. word_count('rah rah ah ah ah\troma roma ma\tga ga oh la la\t'
  8.                        'want your bad romance')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement