Learn to Code via Tutorials on Repl.it!

← Back to all posts
Pickle your objects in python
SkyyCivil (120)

pickle is the function that saves/stores user data

import pickle
that adds the function and lets the program know 'he will need to save user input'
name=input("Enter your username")
that is the part where you tell the program hey i am putting in a name so tell the user to put in a name
pickle.dump(name, open(name, "wb")
this tells the system to go ahead and open a file of your name that you entered
that is just to top it off!
-hope this helps