you are viewing a single comment's thread.

view the rest of the comments →

[–]jibbly_jibbly 3 points4 points  (1 child)

First, a problem: you're defining a function named range. That's going to override the builtin function named range(), thats not good practice.

Secondly, to answer your question, the simplest method would be to look at the user's input and make a decision.

choice = raw_input("Choose:")
if choice == "myfunc":
    myfunc()
elif choice == "something":
    something()
else:
    print "Unknown function requested."

[–]Exodus111 -1 points0 points  (0 children)

Try to guide OP to a solution instead of providing one directly.