I read "How to think like a Computer Scientist. Learning with Python." book. So I usually have no difficulties to interpret examples from python2 to python3, but at chapter 11 Files & Exceptions I encountered this snippet
>>> import pickle >>> f = open("test.pck", "w") >>> pickle.dump(12.3, f) >>> pickle.dump([1,2,3], f) >>> f.close() which when I evaluate it using Python 3.5.2 gives this error
Traceback (most recent call last): File "/(myDirs)/files.py", line 3, in <module> pickle.dump(3.14, f) TypeError: write() argument must be str, not bytes I am not a good docs reader, so if you can help me to solve this riddle I would be grateful.