mencegah indeks daftar di luar jangkauan python

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