I'm sometimes asked for my recommended reading/watching or what my favorite PyCon talks are or what resources I'd recommend for learning [Python topic X]. I've made this list of resources to help answer these questions.
If you have a question that isn't answered by this resource list, feel free to send it my way. I may not have recommendations, but I might know someone else who does.
Articles & Talks
Language Fundamentals
- Keyword (Named) Arguments in Python: How to Use Them by Trey Hunner: a discussion of the ways keyword arguments are used in Python
- Multiple assignment and tuple unpacking improve Python code readability by Trey Hunner: an explanation of the many ways to use multiple unpacking in Python
- Asterisks in Python: what they are and how to use them by Trey Hunner: an explanation of the many ways to use the
*and**operators
Pythonic Code
- Readability Counts by Trey Hunner: a handful of tips for writing more readable code
- Craft Your Python Like Poetry by Trey Hunner: a portion of my Readability Counts talk expanded
- Transforming Code into Beautiful, Idiomatic Python by Raymond Hettinger: a walk through many of Python's more important idioms
- Elegant Solutions For Everyday Python Problems by Nina Zakharenko: a whirlwind tour of a lot of advanced Python language features
- Writing Beatiful Code by Anand Chitipothu: a related discussion on code readability
- Beyond PEP 8 by Raymond Hettinger: surface level code style isn't everything
Looping
- How to loop with indexes in Python by Trey Hunner: range, enumerate, zip, and when to use them
- The Iterator Protocol: How “For Loops” Work in Python by Trey Hunner: a look at the iterator protocol that powers Python's
forloops - Loop like a native by Ned Batchelder: a dive into the many ways of looping in Python
- Comprehensible Comprehensions by Trey Hunner: all about list comprehensions and why and how to use them
- Python List Comprehensions: Explained Visually by Trey Hunner: a portion of the Comprehensible Comprehensions talk in article form
- Loop Better: a deeper look at iteration in Python by Trey Hunner: a dive into Python's iterator protocol
- How to make an iterator in Python by Trey Hunner: generator functions, generator expressions, and iterators
Variables, values, and scope
- Facts and Myths about Python names and values by Ned Batchelder: false assumptions programmers make about variables in Python
- Names Objects and Plummeting From The Cliff by Brandon Rhodes: a visual demonstration of Python's variable handling and garbage collection
- Is Python call-by-value or call-by-reference? Neither. by Jeff Knupp: this will make more sense after watching the talks above
Functions and algorithms
- Recursion for Beginners: A Beginner's Guide to Recursion by Al Sweigart: on how recursion works and why it doesn't come up often
- Big-O: How Code Slows as Data Grows by Ned Batchelder: on thinking about computational complexity in Python
Classes and objects in Python
- Python's Class Development Toolkit by Raymond Hettinger
- Easier Classes: Python Classes Without All The Cruft by Trey Hunner
- Stop Writing Classes by Jack Diedrich
Miscellaneous overlooked facts and features
- All About Decorators: links to screencasts and talks on decorators and my decorators course
- Python Oddities Explained by Trey Hunner: a walk through a number of different Python gotchas
- Check Whether All Items Match a Condition in Python by Trey Hunner: a discussion of the any and all built-in functions
- The Idiomatic Way to Merge Dictionaries in Python by Trey Hunner: a Python 3 feature that's often overlooked
- Counting Things in Python: A History by Trey Hunner: a number of different approaches to a problem, from a historical perspective
- Unique sentinel values, identity checks, and when to use object() instead of None by Trey Hunner: an explanation of the mysterious
object() - Why you should be using pathlib by Trey Hunner: my reasons for why I love Python's pathlib module
- Default Parameter Values in Python by Fredrik Lundh: an explanation of why mutable default arguments can be a problem
- Python's strftime directives by Will McCutchen
Communication
- What Nobody Tells You About Documentation by Daniele Procida
- Emotional Intelligence for Engineers by April Wensel
- Write an Excellent Programming Blog by A. Jesse Jiryu Davis
Automated Testing
- Getting started with automated testing by Carl Meyer
- Getting Started Testing by Ned Batchelder
- Testing-Driven Development with Python by Harry Percival
Tutorials
- Using List Comprehensions and Generator Expressions for Data Processing by Trey Hunner
- Readable Regular Expressions by Trey Hunner
Python Podcasts
Python Exercises
See Python Morsels alternatives for some competing Python exercise sites.
If you're looking for more learning, you might want to checkout some of my Python articles, Python talks, or recordings of my many live Python Chat events (they're basically webinars but fun).