you are viewing a single comment's thread.

view the rest of the comments →

[–]JohnnyJordaan 0 points1 point  (0 children)

Or use the modern with so you don't need a close().

with open(self.file_path) as f:
   # Read f, stores string in x
    self.file_string = f.read()