I am trying to print a file's word count so I could parase it to q.put()
.
I am calling:
with open('medium.txt', 'r') as f:
for word in f:
print(len(word))
Exept I get this:
11
3
7
5
7
But what I want is this:
1
2
3
4
5
I want the total number of words printed in order from 1
to however much words there are.