+3

pairs = {1: "apple", "orange": [2, 3, 4], True: False, None: "True", }

Print(pairs.get(1)) Mustn't this result in => apple??? 🤔

6/23/2019 7:38:40 AM

sanduni ayesha

2 Answers

New Answer

+5

No, because then you also used True, and that evaluates to 1, so it will get that instead

+6

0 and 1 should not been used as key in dicts. You can use '0' and '1' instead.