Guest User

Untitled

a guest
Oct 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. `fname = input("Enter file name: ")
  2. if len(fname) < 1 : fname = "mbox-short.txt"
  3. fh = open(fname)
  4. i = 0
  5. count = 0
  6. with open(fname, 'r') as fh:
  7. for line in fh:
  8. temp = line.split()
  9. #print(temp[0])
  10. count+=1
  11. print(count)`
Add Comment
Please, Sign In to add comment