I have a list which contains the data of different people such as
data = ['john', '5.5', 'Alice', '5.0', 'Smith', '5.8', 'Kelvin', '6.0']
Now i want to enter a string or the floating value in a method that should return me the index of that.
For example if i want to get the index number of
Smith then the method should return me the index of that item in the list. How can i do it in python?