Use a dictionary, example:
def CC(): print('This is funuction CC') def RV(): print('This is funuction RV') MyFunctions = { 'CC': CC, 'RV': RV } def pick_a_function(): while True: func = input("Choose function 'CC', 'RV' or 'Q' to quit: ") if func == 'Q': break elif func in MyFunctions: MyFunctions[func]() else: print('Invalid function, Try Again') pick_a_function()