Z
Zach Shutters
ok, i am trying to learn how to use dictionaries and i am having trouble
with this code:
def function1():
print "function1"
def function2():
print "function2"
dict = {"1":function1,"2":function2}
x = input ("1 or 2?")
dict[x]()
with this code:
def function1():
print "function1"
def function2():
print "function2"
dict = {"1":function1,"2":function2}
x = input ("1 or 2?")
dict[x]()