if arg[1] == 'test1': print func1(a) elif arg[1] == 'test2': print func1(b) elif arg[1] == 'test3': print func2(a) ...