Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def word_count(text):
  2. wordAll=text.split(' ')
  3. wordDic={}
  4. for i in wordAll:
  5. wordCnt=wordAll.count(i);
  6. wordDic[i]=wordCnt
  7.  
  8. print("\n당신이 입력하신 문장의 단어수는 아래와 같습니다.\n")
  9.  
  10. for cnts in wordDic:
  11. print(cnts," : ",wordDic[cnts])
  12.  
  13. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement