Skip to content
Permalink
1f6e0f602e
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
11 lines (10 sloc) 344 Bytes
list = [2,4,1,2,5,6,15,23,21]
def linearsearch(list,x):
for i in range(len(list)):
if x in list:
return print("The number you searched for is in the list.")
else:
print("No, the number you searched for is not in the list.")
break
x = int(input("Pick a number to search for: "))
linearsearch(list,x)