Given a list L containing n elements.
We are asked to find position/index an element k if it's present in list L
1. Form the list as user's input.
2. Ask the user the element to be searched (key element).
3. Set boolean variable 'found' as False.
4. Run a for loop i in range from 0 to length of L i.e. n .
5. Using if command check if key element is equal to L[i].
6. If yes :
change 'found' to True
print the index L[i]
break the loop
7. If boolean variable 'found' is still False then print
key element not found.
L = 
n = input("Enter size of list: ")
for i in range(n):
num = input(" Enter any number: ")
k = input("\nEnter number to search: ")
found = False
for i in range(len(L)):
if L[i] == k:
found = True
print k," found at position ", i
if not found:
print k," is not in list"
Enter size of list:3
Enter any number: 1
Enter any number: 2
Enter any number: 3
Enter number to search: 5
5 is not in list