Commit 07cde6e3 authored by NENAVATH SRIKANTH's avatar NENAVATH SRIKANTH


parent b38c93e8
Pipeline #14852 passed with stage
in 14 seconds
list_of_elements = [4, 2, 8, 9, 3, 7]
x = int(input("Enter number to search: "))
found = False
for i in range(len(list_of_elements)):
if(list_of_elements[i] == x):
found = True
print("%d found at %dth position"%(x,i))
if(found == False):
print("%d is not in list"%x)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment