Skip to content

Commit

Permalink
Update solution.py
Browse files Browse the repository at this point in the history
kyu_7/valid_parentheses/solution.py:53:19: R1736: Unnecessary list index lookup, use 'char' instead (unnecessary-list-index-lookup)
  • Loading branch information
ikostan committed Nov 30, 2024
1 parent ab6ed0c commit 4f9d623
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kyu_7/valid_parentheses/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 4f9d623

Please sign in to comment.