logo CodeStepByStep logo

is_palindrome

Language/Type: Python lists string

Write a function is_palindrome that accepts a list of strings as its argument and returns True if that list is a palindrome (if it reads the same forwards as backwards) and False if not. For example, the list ["alpha", "beta", "gamma", "delta", "gamma", "beta", "alpha"] is a palindrome, so passing that list to your function would return True. Lists with zero or one element are considered to be palindromes.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.