aboutsummaryrefslogtreecommitdiff
path: root/lesson1.py
diff options
context:
space:
mode:
Diffstat (limited to 'lesson1.py')
-rw-r--r--lesson1.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lesson1.py b/lesson1.py
index 24e409f..c2c59f4 100644
--- a/lesson1.py
+++ b/lesson1.py
@@ -12,12 +12,9 @@ def binsearch(arr: list, item):
while not found and lbound <= ubound:
index = (lbound + ubound) // 2
if lbound == ubound:
- if arr[lbound] == item:
+ if arr[index] == item:
found = True
print("Found here")
- break
- else:
- break
if arr[index] > item:
ubound = index - 1
if arr[index] < item: