How to find and display the position of an item in the list, not setting the string value for the search?
Ex:
nome_pessoa = str(input('Informe o seu nome completo: '))
lista_nomes = nome_pessoa.split()
After the names are divided and transformed into a list, you would like to know how to tell which position the third name (or item) is in.
Suppose that in this first execution, the user has entered the name: 'Pedro Lucas Gomes'.
In this way, after transforming this string in the list with the names, it will have the items: ['Pedro', 'Lucas', 'Gomes']
What I want in output data, ie print
The name of the second position, which in this case would be 'Gomes', and the position number, which will be 2.
BUT IN THE SECOND EXECUTION, the user type the name 'João Neves Frufru Feitosa', what I want in the output is:
The name of the second position is 'Frufru', and the number of its position is 2.
Have you understood? I will not use the command:
print (name_name.infr ('Frufru'))
Because the name 'Frufru', will not be fixed in the code! The name requested in the program will be typed from the keyboard by the user at the time of each code execution.
(Thanks to all who are struggling to help and I apologize for my lack of clarity before editing)