Last active
March 8, 2018 20:23
-
-
Save arthurbarros/fee99de8b064067969da564147c0ae1c to your computer and use it in GitHub Desktop.
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
import json | |
whitelist = [] | |
def add_user_whitelist(user_id): | |
whitelist.append(user_id) | |
add_user_whitelist(12345678000) | |
with open('local.txt', 'w') as file: | |
json_encoded = json.dumps(whitelist) | |
file.write(json_encoded) |
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
import json | |
with open('local.txt', 'r') as file: | |
whitelist = json.loads(file.read()) | |
print(whitelist) # [ 12345678000 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment