myList=[1,2,3,4,5]

try:
  print(myList[12])
except IndexError as msg:
  print(msg)
try:
  print(myList[12])
  raise(IndexError('不存在'))
except IndexError as msg:
  print(msg)



441154014052b0a7a1f765519cfc9f07429ed604
<mask token>

<mask token>
try:
    print(myList[12])
except IndexError as msg:
    print(msg)
try:
    print(myList[12])
    raise IndexError('不存在')
except IndexError as msg:
    print(msg)

myList = [1, 2, 3, 4, 5]
try:
    print(myList[12])
except IndexError as msg:
    print(msg)
try:
    print(myList[12])
    raise IndexError('不存在')
except IndexError as msg:
    print(msg)

myList=[1,2,3,4,5]

try:
  print(myList[12])
except IndexError as msg:
  print(msg)
try:
  print(myList[12])
  raise(IndexError('不存在'))
except IndexError as msg:
  print(msg)


