Created
November 22, 2017 15:01
-
-
Save tadone/0655c2f1eb4b5fe32acd7d8ff42b5286 to your computer and use it in GitHub Desktop.
[Read Lines from file] Strip new line character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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