Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Read all lines from a file that do not begin with an # and put them into a set
- keywords = set()
- for line in open("keywords.txt"):
- line = line.strip()
- if not line.startswith("#"):
- keywords.add(line)
- print(sorted(keywords))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement