Quick actions

cmd+k|ctrl+k

Navigation

Languages

Dictionary_Data_Types

Snippet info

Language

Python

Visibility

public

Author

kofipsmarte

Created

2026-04-09T06:29:04.430043Z

Updated

2026-04-09T06:29:04.430043Z

#Dictionary is an unordered key value pair, it is a data type and unstructer data types

dict = {
    'a': 1,
    'b': 2,
    'x': True
}

print(dict['a'])
print(dict)


dict = {
    'c': [1,2,3,4],
    'd': 'hello',
    'e': False
}

print(dict['c'][2])

my_list = [
    
    {
    'a': [1,2,3],
    'b': 'mello',
    'x': True
},
{
    'c': [4,5,6],
    'd': 'hello',
    'e': False
}
    
]

print(my_list[0]['a'][2])
INFO