0
dictionary
def, I don't get this part
4 Antworten
+ 2
dictionaries are in key and values pairs and it do not have any indexes. It can be integer, strings, float anything
{
'key':value,
'key':value
}
Ex:
{
'ball':46,
'cricket':34,
}
+ 1
In What language? Python, C#, ...
0
Unknowns ,
your statement that any data type can be used in dictionaries can mislead readers.
a *key* must be hashable, that means:
> a keys must be an *immutable data type*.
we cannot use data types as a key that can change after they are created like:
> list, dictionary, set
*values* can be of any data type
0
Lothar I never mentioned keys to be of any data type and thanks for clarifying in detail



