Skip to content

Commit 20b78d5

Browse files
committed
to remove falsy
1 parent d684771 commit 20b78d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: dynamic_programming/trapped_water.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def trapped_rainwater(height: list[int]) -> int:
2626
trapped_rainwater([7,1,5,3,6,4])
2727
>>> 9
2828
"""
29-
if not height or height == []:
29+
if not height:
3030
return 0
3131
if any(h < 0 for h in height):
3232
raise ValueError("No height can be negative")

0 commit comments

Comments
 (0)