可以用字典来代替。def fun1(): print 'a'dict1 = {'a':fun1, 'b':None, 'c':'C'}dict1['a']2.7环境。手机打的,不是很详细。
可以用if else代替吧