how to access variable from function in another python file code example
Example 1: how to import a variable from another python file
from file1 import x1
print(x1)
Example 2: how to use variable from another function in python
>>> def oneFunction(lists):
category=random.choice(list(lists.keys()))
return random.choice(lists[category])
>>> def anotherFunction():
for letter in oneFunction(lists):
print("_",end=" ")