+ 4
How this code has been solved? [SOLVED]
spam = {i : i%3 + i for i in range(1,11)} print(spam[spam[2]]) Ans. -> 5 https://code.sololearn.com/c7v45JFsJeMl/?ref=app
2 Respuestas
+ 4
If you add print(spam)
It will print the dictonary and there you can follow what happens.
Spam[2] gets 4 and then spam[4] gets the 5 from the dictonary.
+ 4
Thanks
Dragonxiv