From 7112ed4c693fcaffdb0db466a26aa3a25f860956 Mon Sep 17 00:00:00 2001 From: Chiao Yang Date: Tue, 15 Apr 2025 16:24:13 +0800 Subject: [PATCH] Update 0076-minimum-window-substring.py follows pylint C0200:consider-using-enumerate this makes the code cleaner and passs the pylint check Signed-off-by: Chiao Yang --- python/0076-minimum-window-substring.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/0076-minimum-window-substring.py b/python/0076-minimum-window-substring.py index 6cd604ac6..66b2f96e0 100644 --- a/python/0076-minimum-window-substring.py +++ b/python/0076-minimum-window-substring.py @@ -10,8 +10,7 @@ def minWindow(self, s: str, t: str) -> str: have, need = 0, len(countT) res, resLen = [-1, -1], float("infinity") l = 0 - for r in range(len(s)): - c = s[r] + for r, c in enumerate(s): window[c] = 1 + window.get(c, 0) if c in countT and window[c] == countT[c]: