Here we are going to elaborate In python how to Find the index of an item in a list,Suppose i have a list [“Red”, “blue”, “green”, “orange”] , How to find out in the color list what is the position or key of “green”
array1 = ["Red", "blue", "green", "orange"] print array1.index("green") Output 2