1loop through list, find specific number and output element's index
2numbers = [1,5,7,8,2,34,5,23,145,87]
3N = 3
4if N in numbers:
5 print(numbers.index(N))
6elif N not in numbers:
7 print(-1)
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content