I'm having some problems with this:
I have two files: random and random2
random has this:
verb_list = ['x', 'y', 'z']
other_list = ['1', '2', '3']
something_else = False
x = 1
if __name__ == "__main__":
AttributeError: module 'random2' has no attribute 'x'
x is not created until the
Main() function is run. Importing a module means that
__name__ isn't set to
__main__, so the function is never executed.
You must execute the Main() function. Put
random2.Main() in the file
random.py after the import line.
random is a very poor name for a module, since it collides with the standard python
random module. It can create unexpected side effects.