I m trying to get my script to still print action 2 "print (list1[3])" and skip action 1 "print (list1[9])" if it can not execute it. I aplozise in advnace if my question is not clear enough I m trying to do my best to explain the issue. I m a beginner.
list1 = ['a','b','c','d','f']
try:
for i in list1:
#action 1
print (list1[9])
#action 2
print (list1[3])
break
except:
pass
try/exceptrather than the whole loop.