Answers for "check if index exists python"

1

python if index in list exists

ar=[1,2,3]

try:
    t=ar[5]
except IndexError:
    print('sorry, no 5')
Posted by: Guest on May-11-2021

Code answers related to "check if index exists python"

Python Answers by Framework

Browse Popular Code Answers by Language