Skip to content

Commit 0a72460

Browse files
Reorganize imports in valid_palindrome.py
Moved the import of `unittest` to the top of the file for better organization and adherence to Python's import conventions. No functional changes were made to the existing code logic.
1 parent 065af19 commit 0a72460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Two Pointers/valid_palindrome.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# https://neetcode.io/problems/is-palindrome
22

3+
import unittest
4+
35
# `isalnum()` method returns True if all the characters are alphanumeric, meaning alphabet letter (a-z) and numbers (0-9).
46
# `isalpha()` method returns True if all the characters are alphabet letters (a-z).
57
# `isdigit()` method returns True if all the characters are digits (0-9).
@@ -15,8 +17,6 @@
1517
# ord('0') <= ord(character) <= ord('9')
1618
# )
1719

18-
import unittest
19-
2020

2121
def is_palindrome(sentence: str) -> bool:
2222
n = len(sentence)

0 commit comments

Comments
 (0)