Y
Hacker News
new
|
ask
|
show
|
jobs
by
bkad
2921 days 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"