Saving and loading the game<

There is no built in load and save functionality. This is because it depends entirely on your game and what specific data needs to be saved. Basically you need to gather all of the information that needs to be remembered, and dump it into a file.

A VERY simple game for example might only need to remember the position of the player and some enemies. So you could write into the first line of the file the position of the player, and any extra lines after that are positions of enemies. When you load this file, you know the position of the player and where to spawn each enemy. Of course as the game gets more complex the format of the save file will also become more complex.

You might find the json module which comes standard with Python useful. It lets you take a structure of data made up of lists and dictionaries and read and write it easily to a file.

Followup: Just noticed this is in the C++ forum, so the last bit of info may or may not be relevant.