Arista Networks Interview Question

Write the code to detect if a word is a palyndrome