Created
August 1, 2016 00:14
-
-
Save manichabba/ae0db8411b36b49b4d0974c7df7d3602 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fname = raw_input("Enter file name: ") | |
fh = open(fname) | |
lst = list() | |
for line in fh: | |
for word in line.split(): | |
if word not in lst: | |
lst.append(word) | |
lst.sort() | |
print lst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fname = raw_input("Enter file name: ") | |
fh = open(fname) | |
lst = list() | |
for line in fh: | |
for word in line.split(): | |
if word not in lst: | |
lst.append(word) | |
lst.sort() | |
print lst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment