I am calling a function from a second script but the variable from the first script is not recognized.
script1
selection = int(raw_input("Enter Selection: "))
if selection == 1:
import script2
script2.dosomething()
script2
def dosomething():
while selection == 1:
......
......
It displays "NameError: global name 'selection' is not defined"
Is it something to do with global variables?