Given: A sequence S
Question: A function that returns
True if and only if
S is a palindrome: i.e., is the same sequence when
- [1,2,3,3,2,1] is a palindrome.
- ['a','b','b','b'] is not a palindrome.
- [1,'2',2,'1'] is not a palindrome.
Hint: This is trickier than it looks if you try to do it
the obvious way. You'll need to study the Python built-in
reversed() carefully and do some experimentation.