Closed villares closed 6 years ago
I'm guessing it's because you're not closing the file.
No error now :) But it doesn't work (or I don't understand what I'm doing) :(
import pickle
A = ["to be saved"]
f = open("variableA.p", "wb")
pickle.dump(A, f)
f.close()
A = ["temp value"]
print A
f = open("variableA.p", "rb")
pickle.load(f)
print A
f.close()
PS: I've tried the more elegant with open( ... ) as f:
thing too
A = pickle.load(f)
Thank you!!!
Hi, maybe it's me but this is giving an error:
The error is: