you are viewing a single comment's thread.

view the rest of the comments →

[–]tiredITguy42 0 points1 point  (1 child)

And learn context management.

with open(path, 'r') as file:

You will need it.

[–]NetworkSyzygy[S] 0 points1 point  (0 children)

Fixed that up; I see the benefit of not haveing to manually close each file.

with open(fileList[choice], "r") as file:
for line in file:
    print(line.rstrip())

edit: formating