1a_list = [1, 2, 3, 1]
2
3indices = []
4for i in range(len(a_list)):
5 if a_list[i] == 1:
6 indices.append(i)
7
8# more concise way
9a_list = [1, 2, 3, 1]
10indices = [index for index, element in enumerate(a_list) if element == 1]
1#Example List
2list = ['apples', 'bannas', 'grapes']
3#Use Known Entites In The List To Find The Index Of An Unknown Object
4Index_Number_For_Bannas = list.index('apples')
5#Print The Object
6print(list[Index_Number_For_Bannas])
7