#palindrome.py def is_palindrome(s): for i in range(len(s)//2): if s[i] != s[-1-i]: return False return True s = 'asdffdsa' print(is_palindrome(s)) s = 'asdffXsa' print(is_palindrome(s)) s = 'asdfdsa' print(is_palindrome(s)) s = 'asdfdXa' print(is_palindrome(s)) s = 'a' print(is_palindrome(s)) s = '' print(is_palindrome(s))