Quick actions

cmd+k|ctrl+k

Navigation

Languages

Dictionaries

Snippet info

Language

Python

Visibility

public

Author

rajib-016

Created

2026-01-22T08:24:45.2185Z

Updated

2026-01-24T06:48:41.56398Z

#Dictionary
dictionary = {
    'a' : [1,2,3],
    'b' : 'hello',
    'x' : True
}
print(dictionary['b'])
print(dictionary)

my_list = [
    {
    'a' : [1,2,3],
    'b' : 'hello',
    'x' : True
    },
    
    {
    'a' : [1,2,3],
    'b' : 'hello',
    'x' : True
    }
    
    ]
    
print(my_list [1] ['b'] [0:5])















dictionary = {
    'weapons' : [1,2,3],
    'greeting' : 'hello',
    'is_magic' : True
    }




dictionary = {
    'basket' : [1,2,3],
    'greet' : 'hello'
}

print(dictionary ['basket'])



user = {
    'basket' : [1,2,3],
    'greet' : 'hello',
    'age' : 20
}
print('basket' in user)

user2 = {
    'basket' : [1,2,3],
    'greet' : 'hello',
    'age' : 20
}
print(20 in user2.keys())


user3 = {
    'basket' : [1,2,3],
    'greet' : 'hello',
    'age' : 20
}
print(20 in user3.values())
INFO