← BYTES
Python·Starter·Ref: 6.1.13

Besides being hashable, what must a Python dictionary's keys satisfy syntactically?

Have a question about this video? Mention reference 6.1.13 when you contact us.

a.Keys must all be strings
b.Keys must be listed in sorted order
c.Keys must be unique within that dictionary -- using the same key again overwrites the previous value
d.A dictionary can have at most one key
A dict maps each unique key to exactly one value; assigning to an existing key replaces its value rather than creating a duplicate entry -- there's no restriction on key TYPE beyond hashability, but each key can only appear once.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES6113#Python