Python call function with same name as input : Is there a way in python (without using switch statements or if's and an array) to call a function with the same name as an input. E.g.

    x=input("string input")
    
    def foo():
        print("foo")
    def bar():
        print("bar")
if x is foo I want to call foo()
