Python 3 have no GOTO or something like this. But I have some algoritm, that need GOTO type functionality. May be someone can suggest way out?
Main menu
1-New Game 2-Options 3-Exit
User actions - enter to main menu - enter to options menu - enter to main menu AGAIN and so on. So in code I don't know how turn back and teleport to upper code with main menu.
You could use a dictionary: 'user choice' -> 'corresponding action' e.g.:
See complete example that also shows how to create menu dynamically from a configuration file.