I have a list that looks like this:
a = [[\'a string\', [0, 0, 0], [22, \'bee sting\']], [\'see string\',
[0, 2, 0], [22, \'d string\']]]
To add to @ Rapolas K's answer:
I found that I had problems with the file not closing so used this method:
with open('afile','rb') as f:
pickle.load(f)
Decided to make it as an answer. pickle.load method expects to get a file like object, but you are providing a string instead, and therefore an exception. So instead of:
pickle.load('afile')
you should do:
pickle.load(open('afile', 'rb'))