0

dictionary

def, I don't get this part

26th Oct 2025, 1:39 PM
Tun Tun
Tun Tun - avatar
4 Respuestas
+ 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, }
26th Oct 2025, 2:13 PM
Unknowns
+ 1
In What language? Python, C#, ...
26th Oct 2025, 1:41 PM
Roman Koerdt
Roman Koerdt - avatar
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
26th Oct 2025, 5:02 PM
Lothar
Lothar - avatar
0
Lothar I never mentioned keys to be of any data type and thanks for clarifying in detail
26th Oct 2025, 5:14 PM
Unknowns