Skip to content

Instantly share code, notes, and snippets.

@Alexpeain
Created January 16, 2021 14:27
Show Gist options
  • Save Alexpeain/a6e0ac863d5ce88df3dd4822be735245 to your computer and use it in GitHub Desktop.
Save Alexpeain/a6e0ac863d5ce88df3dd4822be735245 to your computer and use it in GitHub Desktop.
travel_plans2.txt
#This summer I will be travelling.
#I will go to...
#Italy: Rome
#Greece: Athens
#England: London, Manchester
#France: Paris, Nice, Lyon
#Spain: Madrid, Barcelona, Granada
#Austria: Vienna
# I will probably not even want to come back!
# However, I wonder how I will get by with all the different languages.
# I only know English!
file = open('travel_plans2.txt','r')
lines=file.readlines()
num_lines = 0
for i in lines:
num_lines += 1
print(num_lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment