Skip to content

Instantly share code, notes, and snippets.

@tiwarinaman
Created August 30, 2020 09:19
Show Gist options
  • Select an option

  • Save tiwarinaman/9075fbc5e303efd7b2db2667833c37b5 to your computer and use it in GitHub Desktop.

Select an option

Save tiwarinaman/9075fbc5e303efd7b2db2667833c37b5 to your computer and use it in GitHub Desktop.
Sequential search in python
def binary_search(list,data):
for i in list:
if i==data:
print("Data is present")
break
else:
print("Not found")
list=[32,33,41,35,67,54,3,5,44,3,2]
data = int(input('What you want to search :: '))
binary_search(list,data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment