Rules Engine For Python Code For Palindrome