Skip to content

Instantly share code, notes, and snippets.

@islandjoe
Created June 4, 2018 17:40
Show Gist options
  • Save islandjoe/0038a429f3dc21c2189a91cdc777ce20 to your computer and use it in GitHub Desktop.
Save islandjoe/0038a429f3dc21c2189a91cdc777ce20 to your computer and use it in GitHub Desktop.
Reading from a text file in Python.
theFile = open("messages.txt", "r")
messages = theFile.read().splitlines()
theFile.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment