circuitpython/tests/basics/del-subscr.py
Damien George f4c9b33abf py: Remove DELETE_SUBSCR opcode, combine with STORE_SUBSCR.
This makes the runtime and object APIs more consistent.  mp_store_subscr
functionality now moved into objects (ie list and dict store_item).
2014-04-08 21:32:29 +01:00

14 lines
126 B
Python

l = [1, 2, 3]
print(l)
del l[0]
print(l)
del l[-1]
print(l)
d = {1:2, 3:4, 5:6}
del d[1]
del d[3]
print(d)
del d[5]
print(d)