Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `fname = input("Enter file name: ")
- if len(fname) < 1 : fname = "mbox-short.txt"
- fh = open(fname)
- i = 0
- count = 0
- with open(fname, 'r') as fh:
- for line in fh:
- temp = line.split()
- #print(temp[0])
- count+=1
- print(count)`
Add Comment
Please, Sign In to add comment