Here's a recursive solution that almost gave me an aneurysm:
#! /usr/bin/python3 from sys import argv, exit def is_palindrome(s): if s != '': if s[0] != s[-1]: return False return is_palindrome(s[1:-1]) return True if __name__ == "__main__": if len(argv) < 2: print("Enter a word as an argument") exit() print(is_palindrome(argv[1]))