Determine if a string is a palindrome

Question Q2.3.2

Write a single-line expression for determining if a string is a palindrome (reads the same forwards as backwards).


Solution

To access solutions, please obtain an access code from Cambridge University Press at the Lecturer Resources page for my book (registration required) and then sign up to scipython.com providing this code.