You should get familiar with functions.
You can put code into functions that are commonly used (such as the Options menu) so you can call the function from various parts of your game logic allowing the user the access the Options.
For functions in Python, look at this tutorial.