Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Pickling Error

$
0
0
I am trying to make a simple pickling program but i can't figure out the error. Can someone please enlighten me.
I have checked this thing over and over, i am running Python 3.3.0 so i think that it is a conversion error because i am using a 2.7.0 tutorial but i can't find the correct conversion.
import pickle

inventory = ['Bow','Sword','Shield','Hammer']
file = open('save.txt', 'w')
pickle.dump(inventory, file)
file.close()


Viewing all articles
Browse latest Browse all 51036


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>