From ed80d29609acdcbf0aed4b9a6e4390b561e67f9c Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Sat, 11 Dec 2021 06:49:39 +0100 Subject: [PATCH] day11: testing for set() and len(set()) > 0 is the same --- day11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day11.py b/day11.py index de67962..f50541b 100644 --- a/day11.py +++ b/day11.py @@ -20,7 +20,7 @@ def flashGrid(grid: Grid) -> int: flashers.add(c) did_flash = set() - while len(flashers) > 0: + while flashers: thisFlash = flashers.pop() did_flash.add(thisFlash) grid.set(thisFlash, 0)