mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 09:30:24 +08:00
12 lines
203 B
Python
12 lines
203 B
Python
|
# list poppin'
|
||
|
a = [1, 2, 3]
|
||
|
print(a.pop())
|
||
|
print(a.pop())
|
||
|
print(a.pop())
|
||
|
try:
|
||
|
print(a.pop())
|
||
|
except IndexError:
|
||
|
print("IndexError raised")
|
||
|
else:
|
||
|
raise AssertionError("No IndexError raised")
|