Skip to content

Instantly share code, notes, and snippets.

@dmoneyballer
Created August 21, 2019 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmoneyballer/ad3c9aade5f35ab5f0b444a53adc4b7d to your computer and use it in GitHub Desktop.
Save dmoneyballer/ad3c9aade5f35ab5f0b444a53adc4b7d to your computer and use it in GitHub Desktop.
f = input('what file would you like to read?')
text = set()
with open(f, 'r') as fr:
for line in fr:
vals = line.split()
for val in vals:
text.add(val)
text = sorted(text)
for val in text:
print(val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment