Pergunta de entrevista da empresa Keysight Technologies

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