Quick actions

cmd+k|ctrl+k

Navigation

Languages

Dictionary Methods

Snippet info

Language

Python

Visibility

public

Author

harshdeepsaini2757

Created

2025-11-08T20:37:28.535874Z

Updated

2025-11-08T20:37:28.535874Z

#Dictionary Methods

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

print(dictionary['basket'])
# print(dictionary.get('age'))
print(dictionary.get('age', 55))

user2 = dict(name = 'John')
print(user2)








INFO