Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Constructing Lists with List Comprehensions
Returning an Element of a List If It Exists
Looping over Items and Their Indices in a Sequence
Creating Lists of Lists Without Sharing References
Removing or Reordering Columnsin a List of Rows
Transposing Two-Dimensional Arrays
Getting a Value from a Dictionary
Adding an Entry to a Dictionary
Building a Dictionary Without Excessive Quoting
Building a Dict from a List of Alternating Keys and Values
Extracting a Subset of a Dictionary
Associating Multiple Values with Each Key in a Dictionary
Using a Dictionary to Dispatch Methods or Functions
Finding Unions and Intersections of Dictionaries
Collecting a Bunch of Named Items
Assigning and Testing with One Statement
Randomly Picking Items with Given Probabilities