Can u explain me dictionary, please (part of code) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can u explain me dictionary, please (part of code)

pairs = {1: "apple", "orange": [2, 3, 4], True: False, None: "True", } print(pairs.get("orange")) print(pairs.get(7)) print(pairs.get(12345, "not in dictionary")) ———————————————————————— I can't understood, what is doing this code: True: False, None: "True",

3rd Aug 2017, 2:53 PM
Mr. Nobody
Mr. Nobody - avatar
2 Answers
+ 1
They're just key value pairs right?
3rd Aug 2017, 7:26 PM
Dan Walker
Dan Walker - avatar
0
I dunno, it's something around sense of my question)
3rd Aug 2017, 7:29 PM
Mr. Nobody
Mr. Nobody - avatar