Cognizant interview question

write a code for palindrome in python/java