We've got a list of names. In this program, if we find the name in the list, we need to print the position of the item. If you cannot find the name, print Name not found.
Index() and in under the hood
Name position
Report a typo
Sample Input 1:
JohnSample Output 1:
0Write a program in Python 3
# Do not change the list
name_list = ["John", "Bob", "Mary", "Jane", "Jack"]
def position(names, name):
# Write code here
idx_name = input()
# Print the result
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.