I would like to write to and read from a file from python. I wanted to use the 
file to save input to the program in a list. I have been looking around and 
there seems to be several ways to go about it. I tried pickling, but am having 
an issue with it. What would be the correct way to accomplish this? I have 
tried several ways, but to no avail. I get no error msg. but the list isn't 
retaining the info. Is pickling even the best way to do it.

file1 = open("ArtyKlikes.p", "ab")  # likesList
file2 = open("ArtyDislikes.p", "ab")  # dislikes

pickle.dump(likesList, file1)
pickle.dump(dislikeList, file2)

file1.close()
file2.close()

Any help would be greatly appreciated.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to