Evite o índice de lista fora do alcance python

m = [0,1]
try:
  m[3] = 9
except IndexError:
  pass
elcharitas