Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def a(arg):
- print('a %s' % arg)
- def b(arg):
- print('b %s' % arg)
- def c(arg):
- print('c %s' % arg)
- def test_function(func_to_call):
- a_dict = {
- 'a': 2,
- 'b': 3,
- 'c': 4,
- }
- exec('%s(%s)' % (func_to_call, a_dict.get(func_to_call)))
- test_function('a')
- test_function('b')
- test_function('c')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement