extracting each word
if ( ch != ' ▁ ' ) : NEW_LINE INDENT word = word + ch NEW_LINE DEDENT else : NEW_LINE INDENT length = len ( word ) NEW_LINE if ( checkPalin ( word ) and length > length1 ) : NEW_LINE INDENT length1 = length NEW_LINE longestword = word NEW_LINE DEDENT word = " " NEW_LINE DEDENT return longestword NEW_LINE