Skip to content

Instantly share code, notes, and snippets.

@Deusdies
Created March 17, 2018 23:09
Show Gist options
  • Save Deusdies/020fed5257f8bd717312c33c9248ea66 to your computer and use it in GitHub Desktop.
Save Deusdies/020fed5257f8bd717312c33c9248ea66 to your computer and use it in GitHub Desktop.
Python: Getting Started
"""
Check out a great Python course called Python: Getting Started at
https://app.pluralsight.com/library/courses/python-getting-started
"""
students = []
def read_file():
try:
f = open("students.txt", "r")
for student in f.readlines():
students.append(student)
f.close()
except Exception as e:
print("Could not read file")
print(str(e))
read_file()
print("Student list contains")
print(students)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment