how to reference variable in another file python
from vardata import verb_list, other_list
import random
print random.choice(verb_list)
how to reference variable in another file python
from vardata import verb_list, other_list
import random
print random.choice(verb_list)
python use variable in another file
from OtherFile import Variable
#this assumes the 2 files are in the same folder, if not see here:
'''
https://stackoverflow.com/questions/4383571/importing-files-from-different-folder
'''
how to import a variable from another python file
from file1 import x1
print(x1)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us