how to get rid of Index Errors without try and except code example
Example: expect out of range in pytnhon
try:
gotdata = dlist[1]
except IndexError:
gotdata = 'null'
try:
gotdata = dlist[1]
except IndexError:
gotdata = 'null'