Lesson 21 of 34 · +130 xp

Dict Comprehension

Build a dict.

Explained simply

Your task

Assign pairs = {x: x*x for x in range(3)}

dictcomp.py
▶ Output (python)
Click 'Run code' to execute your code in a real sandbox.
← Back