aList = [1,2] try: i = 1 print(aList[i]) except IndexError: print("Index=%d is beyond the bounds of 0-%d" %(i,len(aList))) # aList = [1,2] try: i = 2 print(aList[i]) quotient = 1/0 except IndexError: print("Index=%d is beyond the bounds of 0-%d" %(i,len(aList))) except ZeroDivisionError: print("Cannot divide by zero")