[Solved] Is there a more efficient way to find index of an element without using list built-in functions?
use list comprehension in python l = [3, 11, 4, 9, 1, 23, 5, 11] indexes = [index for index in range(len(l)) if l[index] == 11] output: [1, 7] use numpy for finding the matching indices. import numpy as np l = [3, 11, 4, 9, 1, 23, 5, 11] np_array = np.array(l) item_index = … Read more