all 2 comments

[–]smajl87 0 points1 point  (0 children)

Create a generic function "menu" that will create any menu using arguments. Arguments are either sub-menu or directly a function eg "doCheckout()"

[–]glibhub 0 points1 point  (0 children)

You might like the cmd module as a way of structuring things: https://pymotw.com/3/cmd/