$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #159

Complete the comprehension

# {'a': 1, 'b': 2} -> {1: 'a', 2: 'b'}
flipped = {v: k for k, v in d.____()}

Answer: items (also accepted: items, items())

items() gives the pairs the comprehension swaps.
Play Problem Solving ▸