Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Switching It Up7:01 with Kenneth Love
We can start to get into the actual behavior of our application now. We'll use an
OrderedDict to hold onto our choices and a nifty trick to print out the options to the user and then run their selected function.
OrderedDict- a handy container from the
collectionsmodule that works like a
dictbut maintains the order that keys are added
.__doc__- a magic variable that holds the docstring of a function, method, or class
You need to sign up for Treehouse in order to download course files.Sign up