aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-087/lubos-kolouch/python/ch-2.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/challenge-087/lubos-kolouch/python/ch-2.py b/challenge-087/lubos-kolouch/python/ch-2.py
index 9e09226c34..f0237ec5fb 100644
--- a/challenge-087/lubos-kolouch/python/ch-2.py
+++ b/challenge-087/lubos-kolouch/python/ch-2.py
@@ -24,12 +24,8 @@ def get_rectangle(input_arr):
# if so, check how far can go in the row and columns
# if the rectangle is largest, save the dimensions
- for r, row in enumerate(input_arr):
- if r == len(input_arr) - 1:
- break
- for c, item in enumerate(row):
- if c == len(row) - 1:
- break
+ for r, row in enumerate(input_arr[:-1]):
+ for c, item in enumerate(row[:-1]):
if item:
# print(f"* 1 at {r} {c}")