mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 09:00:23 +08:00
8 lines
123 B
Python
8 lines
123 B
Python
|
# dict object with special methods
|
||
|
|
||
|
d = {}
|
||
|
d.__setitem__('2', 'two')
|
||
|
print(d.__getitem__('2'))
|
||
|
d.__delitem__('2')
|
||
|
print(d)
|