we would check for the palindrome condition if yes we print True else False
if ( xa == xa [ : : - 1 ] or xb == xb [ : : - 1 ] ) : NEW_LINE INDENT return True NEW_LINE DEDENT a = " xbdef " NEW_LINE b = " cabex " NEW_LINE if check ( a , b , len ( a ) ) == True or check ( b , a , len ( a ) ) == True : NEW_LINE print ( True ) NEW_LINE else : NEW_LINE print ( False ) NEW_LINE