Useful Collection Classes in Python You May Not Know

Most Python developers know about dictionaries, lists, and tuples — three workhorse collections that are so useful that they repeatedly appear in Python code. Compared to other languages, these essential collections have such excellent support in the language that they feel almost like native types. For example, they all have special constructors and operators unique … Read more

Python Generator Functions: The Complete Guide

Python Logo

Many Python developers consider generators an advanced topic because they are less well known than sequence types such as lists, arrays, and strings. Also, because the syntax for generator functions can appear strange at first, many developers don’t take the time to learn about them at all. That’s a shame, really, because, in some instances, … Read more