0

pairs = {1: "apple", "orange": [2, 3, 4], True: False, 12: "True", } print(pairs.get("orange")) print(len(pairs))

Why does the len() function print 3 ?????

24th Mar 2022, 3:27 PM
Eyob Yifru
Eyob Yifru - avatar
2 Respuestas
+ 3
Eyob Yifru Because 1 means True So 1 will be override by True and dictionary will have 3 keys
24th Mar 2022, 3:28 PM
A͢J
A͢J - avatar
+ 1
Thank you!!
24th Mar 2022, 3:29 PM
Eyob Yifru
Eyob Yifru - avatar