LearnPy Hub
← Comprehensions problems
Medium

Palindrome Words

Read words and print a list of those that read the same backwards (ignoring case), using one comprehension.

Input

Words separated by spaces.

Output

A Python list.

Sample 1

Input
level noon cat Anna
Output
['level', 'noon', 'Anna']

Sample 2

Input
hello world
Output
[]
solution.py
Output appears here
Palindrome Words · Python practice problem · LearnPy Hub