mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 10:48:58 +08:00
Make some ruff fixes (#8154)
* Make some ruff fixes * Undo manual fix * Undo manual fix * Updates from ruff=0.0.251
This commit is contained in:
@ -30,10 +30,7 @@ def is_palindrome(s: str) -> bool:
|
||||
# with the help of 1st index (i==n-i-1)
|
||||
# where n is length of string
|
||||
|
||||
for i in range(end):
|
||||
if s[i] != s[n - i - 1]:
|
||||
return False
|
||||
return True
|
||||
return all(s[i] == s[n - i - 1] for i in range(end))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user