3 ms·
Seconding the recommendation for the Python Cookbooks (by O'Reilly). I have both the Py 2 and Py 3 versions. I've read the 2 book (multiple authors) pretty much
by vram22 9y ago
Seconding the recommendation for the Python Cookbooks (by O'Reilly). I have both the Py 2 and Py 3 versions. I've read the 2 book (multiple authors) pretty much fully (and much of it more than once), except for a few more advanced recipes, or areas that I was not that interested in, and found it really good. Used some of the ideas and techniques in some production code. The chapter in it on iterators and generators is particularly good (some of the stuff in it is by Raymond Hettinger, who also, IIRC, designed and implemented much of the iterator and generator functionality in Python 2). I've only read parts of my copy of 3 so far, but it is good too, though the style is somewhat different. It is more brief (per recipe, though the book overall is as large or larger than 2), and you have to do more work yourself to understand the recipes. The authors explicitly say this.