blob: bb2ccc6d67ab64a760be57c2b1f9797f0df25485 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
# 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")
|