import variable from another file python code example
Example 1: how to reference variable in another file python
from vardata import verb_list, other_list
import random
print random.choice(verb_list)
Example 2: python use variable in another file
from OtherFile import Variable
'''
https://stackoverflow.com/questions/4383571/importing-files-from-different-folder
'''
Example 3: how to import a variable from another python file
from file1 import x1
print(x1)
Example 4: how to request a variable from imported file python
from file1 import *