Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
!pip install jovian --upgrade --quiet
import jovian
Question 1: The user will enter a list of numbers and a separate number. The program will display the index at which the number is present in the list. If the number is absent, it'll return -1. Do NOT use built-in functions for searching.
user_list2=input([])
for i in range(0,len(user_list2)):
num=input()
if num in user_list2:
user_list2.index(num)
else:
print(-1)
[]1,2,3,4,5,6
2
7
-1
12
-1
15
-1
65
-1