On Python, I made a module for saving and loading integers, It can save roughly as I want it (I am using Pickle) but when I load it I receive my integers in tuple-form (because I made it a tuple to save) I want to assign the components of the tuple to the integers in my program, but it won't please help! Here is my code:
def save(ob1,ob2,ob3,ob4,ob5):
import pickle
tmp = ob1,ob2,ob3,ob4,ob5
output = open('save.sav','w')
pickle.dump(tmp,output)
output.close()
def load(ob1,ob2,ob3,ob4,ob5):
import pickle
input2 = open('save.sav','r')
pickleload = pickle.load(input2)
ob1 = pickleload[0]
ob2 = pickleload[1]
ob3 = pickleload[2]
ob4 = pickleload[3]
ob5 = pickleload[4]
I tried to do what aix said, but it didn't work. I am probably putting his code in the wrong places or something like that. Aix, could you please explain this better, or repost my code but edited? Or can someone else help me?