Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Created May 30, 2022 09:31
Show Gist options
  • Save pointofpresence/6a7301980adae3d9038a0198b56c322b to your computer and use it in GitHub Desktop.
Save pointofpresence/6a7301980adae3d9038a0198b56c322b to your computer and use it in GitHub Desktop.
Read file line by line to list
with open('list.txt') as file:
self.lines = [line.rstrip() for line in file.readlines()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment