python Comprehensions List new_list = [expression(i) for i in old_list if filter(i)] Dictionary >>> d = {n: n**2 for n in range(5)} {0: 0, 1: 1, 2: 4, 3: 9, 4: 16}