4 ms·
dicts are like Maps in JavaScript, so the type of a key matters. It enables usecases where your keys aren't always strings: >> bar = {1: "a", "1": "b"} >>
by bkad 8y ago
dicts are like Maps in JavaScript, so the type of a key matters. It enables usecases where your keys aren't always strings:
>> bar = {1: "a", "1": "b"}
>> bar[1]
"a"
>> bar["1"]
"b"