Created
March 17, 2018 23:09
-
-
Save Deusdies/020fed5257f8bd717312c33c9248ea66 to your computer and use it in GitHub Desktop.
Python: Getting Started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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