Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def word_count(text):
- wordAll=text.split(' ')
- wordDic={}
- for i in wordAll:
- wordCnt=wordAll.count(i);
- wordDic[i]=wordCnt
- print("\n당신이 입력하신 문장의 단어수는 아래와 같습니다.\n")
- for cnts in wordDic:
- print(cnts," : ",wordDic[cnts])
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement