Quick actions

cmd+k|ctrl+k

Navigation

Languages

25/6/2026 Dictionary

Snippet info

Language

Python

Visibility

public

Author

catfisherinvisible

Created

2026-06-25T09:39:56.123793Z

Updated

2026-06-26T09:54:22.29951Z

x = True; y = (1,2); z = None
person = {
    'name' : 'john',   #left hand side: hashing table, can't do amendment
    'age' : 10,
    'gender' : 'male',
    0: 1,
    x : False,
    y : 10,
    z : 10,
    True : False,
    None : 10,
    (1,2) : 10,    #    [1,2] : 10 is muable, so can't put into dictionary
}
print(type(person), id(person), person)
print(person['name'], person['age'])
person['age'] = 11 # muable
print(person)
person['xyz'] = 10 # add information anytime
person['abc'] = 9
print(person)
del person['xyz']
print(person)
l = [1,2,3]
del l[0]
print(l)
INFO