Tuesday, 13 August 2013

Efficient / elegant Python file reading


from ipython.org:

with open('workfile', 'r') as f:
        read_data = f.read()

No comments:

Post a Comment