+ 3
pairs = {1: "apple", "orange": [2, 3, 4], True: False, None: "True", }
Print(pairs.get(1)) Mustn't this result in => apple??? 🤔
2 Réponses
+ 5
No, because then you also used True, and that evaluates to 1, so it will get that instead
+ 7
0 and 1 should not been used as key in dicts. You can use '0' and '1' instead.