KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a one-liner to read all the lines of a file in Python, rather than the standard: f = open('x.txt') cts = f.read() f.close() Seems like this is done so often that there's got to be a one-liner. Any ideas?
Tags (comma-separated)
Save Edits
Cancel