Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- file=open("C:/python27/python operators.txt","r+")
- wordcount={}
- for word in file.read().split():
- if word not in wordcount:
- wordcount[word] = 1
- else:
- wordcount[word] += 1
- for k,v in wordcount.items():
- print k, v
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement