Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 418 Bytes
__author__ = 'Avinash'
lst = []
num = int(input("Enter size of list: \t"))
for n in range(num):
numbers = int(input("Enter any number: \t"))
x = int(input("\nEnter number to search: \t"))
found = False
for i in range(len(lst)):
if lst[i] == x:
found = True
print("\n%d found at position %d" % (x, i))
if not found:
print("\n%d is not in list" % x)