Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import pickle
fruitColors = {"Apple":["Red", "Green"], "Banana":"Yellow", "Carrot": "Orange"}
fruitColors['Plum'] = input("What color is a plum? ")
with open("fruits.p", "wb") as outfile:
pickle.dump(fruitColors, outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment