Loop through a list with both index and value
for i, val in enumerate(items): print(i, val)
Auto-create keys with a default value
Filter a list using a conditional list comprehension
Read a file line by line without loading it all into memory
Sort a list of dictionaries by a specific key