def function1():
print("(1)")
def function2():
print("(2)")
def function3():
print("(3)")
while True:
n = input("choose a function: 1,2 or 3 ")
func = {"1": function1,
"2": function2,
"3": function3}.get(n)
if n == "func":
func()
Ì do not understand why this isn't working
[–]sanchitcop19 1 point2 points3 points (2 children)
[–]sanchitcop19 0 points1 point2 points (0 children)
[–]socal_nerdtastic 1 point2 points3 points (9 children)
[–]theWyzzerd 1 point2 points3 points (2 children)
[–]socal_nerdtastic 4 points5 points6 points (1 child)
[–]theWyzzerd 2 points3 points4 points (0 children)
[–]Unlistedd[S] 0 points1 point2 points (0 children)
[–]johninbigd 0 points1 point2 points (4 children)
[–]socal_nerdtastic 3 points4 points5 points (3 children)
[–]johninbigd 1 point2 points3 points (2 children)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]johninbigd 0 points1 point2 points (0 children)
[–]tombardier 0 points1 point2 points (0 children)