I saw this code on stack overflow
def writeProfile(profileName, profileData):
""" pickle user profile data """
os.chdir(PROFILE_DIR)
fileName = profileName + ".dat"
f = open(fileName, "wb")
pickle.dump(profileData, f)
f.close()
os.chdir("..")
It is for saving progress under the pickle module. I don't see a way to save variables. How would I do that?