Advertisement
Guest User

exercise8

a guest
Nov 24th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. fname = raw_input("Enter file name:")
  2. fhand = open(fname)
  3. lst = list()
  4. for line in fhand:
  5. line.rstrip()
  6. words = line.split(' ')
  7. for i in range(len(words)):
  8. if words[i] not in lst: lst.append(words[i])
  9.  
  10. lst.sort()
  11. print lst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement