I need to have the following dictionary actions = {'1': c1, '2': c2, '3': c3}
def c1():
print 'c1'
def c2():
print 'c2'
def c3():
print 'c3'
commands1 = ['1', '2', '3']
commands2 = [c1, c2, c3]
actions = {}
What I tried:
for c1 in commands1:
for c2 in commands2:
actions = dict(zip(c1, c2))
But it gives an error argument #2 must support iteration