Keysight Technologies interview question

Write a code to check whether a string is a palindrome or not.