I want to get the index of the "4" in the nested list, it is working cause I suppress the error. any idea for a alternative?
a = [[1,2,3],[4,5,6],[7,8,9]]
for i in range(len(a)):
try:
index = a[i].index(4)
print(i, index)
except:
pass