python if data exists at index code example
Example: python if data exists at index
ar=[1,2,3]
try:
t=ar[5]
except IndexError:
print('sorry, no 5')
ar=[1,2,3]
try:
t=ar[5]
except IndexError:
print('sorry, no 5')