1# list poppin' 2a = [1, 2, 3] 3print(a.pop()) 4print(a.pop()) 5print(a.pop()) 6try: 7 print(a.pop()) 8except IndexError: 9 print("IndexError raised") 10else: 11 raise AssertionError("No IndexError raised") 12 13# popping such that list storage shrinks (tests implementation detail of uPy) 14l = list(range(20)) 15for i in range(len(l)): 16 l.pop() 17print(l) 18