13 lines
271 B
Python
13 lines
271 B
Python
def is_palindrome(text: str):
|
|
"""
|
|
Checks if given string is a palindrome
|
|
>>> is_palindrome('')
|
|
True
|
|
>>> is_palindrome('aba')
|
|
True
|
|
>>> is_palindrome('aaaaa')
|
|
True
|
|
>>> is_palindrome('zbcd')
|
|
False
|
|
"""
|
|
return text == text[::-1] |