I am writing a quiz program. I am trying to give the user the opportunity to write and add their own question. I have wrote functions to ask and add questions. I am trying to pickle the list of questions so I can auto load new questions anytime somebody adds one.
This is the code I am using to load the pickled file.
sciIn = open('sciList.txt','rb')
sci = pickle.load(sciIn)
sciIn.close()
I have this code in the function that adds questions.
sciOut = open("sciList.txt",'wb')
sci.append(dicQ)
pickle.dump(sci, sciOut)
sciOut.close()
When I run the code I get EOFError: Ran out of input which points to the loading of the pickle. I am not sure what I am doing wrong. I am using Python 3. Thanks for your help!
full code http://pastebin.com/HEp0KhRA