Write a function that takes in a non-empty string and that returns a boolean representing whether or not the string is a palindrome. A palindrome is dened as a string that is written the same forward and backward.
Sample input:"abcdcba"
Sample output: True (it is a palindrome)
We can use a Stack here
Check this Python code.