Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fname = raw_input("Enter file name:")
- fhand = open(fname)
- lst = list()
- for line in fhand:
- line.rstrip()
- words = line.split(' ')
- for i in range(len(words)):
- if words[i] not in lst: lst.append(words[i])
- lst.sort()
- print lst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement