Joshua C. answered 04/07/19
Tutor
New to Wyzant
Software Engineer in Bay Area
line_by_line = []
with open('filename.txt') as f: # closes file buffer for you
line_by_line = [f.read().splitlines()]
Joshua C. answered 04/07/19
Software Engineer in Bay Area
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.