Hi i'm trying to achieve this output. I'm trying to see if the string is a palindrome by comparing the first word and the last word, second word and the second last word.
King, are you glad you are king is a palindrome (or that's the outcome i'm trying to achieve) as the 1st word is similar to the last word (which is king), the second word is similar to the second last word (which is are), the third word is similar to the third last word (which is you). hence, the output should be true. (this is the requirement of my assignment)
Output i'm trying to achieve: [True, False] Output i got: [False]