which of the following is true about dictionaries? there can be multiple same keys. every value must be unique. every key must be unique. we can’t get every key from the dictionary.
which of the following is true about dictionaries? there can be multiple same keys. every value must be unique. every key must be unique. we can’t get every key from the dictionary.
Answer: The statement that is true about dictionaries is:
“Every key must be unique.”
In a dictionary, each key is associated with a single value, and these key-value pairs are used to store and retrieve data. Dictionaries in programming languages like Python require that keys be unique. This uniqueness ensures that each key corresponds to a specific value and prevents ambiguity when looking up values based on keys. If you attempt to use the same key multiple times in a dictionary, the new value will simply overwrite the old value associated with that key.