Created
October 16, 2017 11:31
-
-
Save tadone/3cd63ded8d42649da7877fe9eb67b837 to your computer and use it in GitHub Desktop.
[Read password lines from file] Read values #python
This file contains 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
# Use this format | |
# username:value | |
# password:value | |
# Assuming no : characters in your usernames or passwords | |
with open('myfile.txt') as f: | |
credentials = [x.strip().split(':') for x in f.readlines()] | |
for username,password in credentials: | |
# your code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment