+ 1
I dont understand a quiz. Can anyone explain me this...
2 Respuestas
+ 4
It is a dictionary comprehension. For the numbers in range(1, 10, 3) - this works out at just the numbers 1, 4 and 7 - the dictionary is created with these numbers (x) as its keys, and x**2 (x squared or x*x) as its values. So key 1 corresponds to the value 1, key 4 has value 16 and key 7 (which is the one in the code) has value 49.
So see the whole dictionary, you can add
print(d)
at the end.
+ 2
Thank You very much Sir.
I was confused at the key part