Is my string palindrome?
I come up with idea of making is_palindrome function that works in O(1) !
Sounds like magic? Maybe, but it's real.
How to get this code?
- Just download
palidrome.py
file - import is_palindrome function and use it!
>>> from palindrome import is_palindrome
>>> is_palindrome("aba")
True
>>>
works only with lowercase ascii letters