Keysight Technologies Interview Question

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