Skip to content

Instantly share code, notes, and snippets.

@tadone
Created November 22, 2017 15:01
Show Gist options
  • Save tadone/0655c2f1eb4b5fe32acd7d8ff42b5286 to your computer and use it in GitHub Desktop.
Save tadone/0655c2f1eb4b5fe32acd7d8ff42b5286 to your computer and use it in GitHub Desktop.
[Read Lines from file] Strip new line character
# Open file
with open(streams_file, 'r') as f:
# Read lines and strip '\n' new line character
streams = [x.strip('\n') for x in f.readlines()] # List of streams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment