Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #takes in txt
- #Prints out names in alphabetical order
- #prints out the countries that person has been to in alphabetical order
- #prints out the name of the person that has traveled to most countries
- def open_file():
- file_stream = open(filename, "r")
- return file_stream
- def split_up(file_stream):
- words = []
- names = file_stream.strip().split(" ")
- for word in names:
- words.append(word)
- return names
- filename = input("Enter filename: ")
- file_stream = open_file()
- names = split_up(file_stream)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement