Skip to content

Commit 045818b

Browse files
authored
Update linearSearch.py
1 parent afe0e04 commit 045818b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

algorithms/linearSearch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# These implementations of the linear search algorithm works only with Python36
22

33
def linearSearch(myItem, myList):
4+
45
found = False
6+
57
position = 0
8+
69
while position < len(myList) and not found:
710
if myList[position] == myItem:
811
found = True

0 commit comments

Comments
 (0)