counts = dict()
for word in x: # x is file named "f2.txt"
words = word.split()
print words
counts[words] = counts.get(words,0) + 1
print counts
counts = dict()
for word in x: counts = dict()
for word in x: # x is file named "f2.txt"
words = word.split()
print words
counts[words] = counts.get(words,0) + 1
print counts
counts = dict()
for word in x: