I have a Python program asking the user to enter as a shell, and if I discover some specific keywords, I want to go into some specific functions.
The thing is, I would like to avoid a lot of if and else if . Usually in C, to avoid this situation, I use an array of function pointers, which I move with while , and use strcmp to validate the input.
I would like to know how to do this in Python, if possible.
Roger source share