From 4f9d623e0467be4c05f81b9a8cab101400a6719e Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Fri, 29 Nov 2024 22:53:55 -0800 Subject: [PATCH] Update solution.py kyu_7/valid_parentheses/solution.py:53:19: R1736: Unnecessary list index lookup, use 'char' instead (unnecessary-list-index-lookup) --- kyu_7/valid_parentheses/solution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyu_7/valid_parentheses/solution.py b/kyu_7/valid_parentheses/solution.py index 72c17d7c59b..ffe53676eaf 100644 --- a/kyu_7/valid_parentheses/solution.py +++ b/kyu_7/valid_parentheses/solution.py @@ -50,4 +50,4 @@ def update_str(paren_str: str, i: int) -> str: :param i: int :return: str """ - return ''.join(paren_str[indx] for indx, char in enumerate(paren_str) if indx not in [0, i]) + return ''.join(char for indx, char in enumerate(paren_str) if indx not in [0, i])