Murder for a jar of red rum

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 512M

Problem type

In an upside down and back to front world of president Trump, Fake News and the Kardashians it may be prudent to begin communicating in phrases that make as much sense backward as the do forward. To that end your aim in this challenge is to determine whether a given phrase will survive in the new world.

Welcome to Palindromes.

A Palindrome is a word, phrase, number or other sequence of symbols or elements that can be read in reverse direction whilst retaining its original semantic.

Your aim is to create a program that determines whether a string fits that definition.

Input Specification

The first line contains a single integer \(T\) (\(1\leq T \leq 10\)), the number of test cases to follow. Following this will be \(T\) lines. Each of these lines defines a test case, and consists of no more than 100 characters.

Please note: white space and any non-alphabetic characters should be ignored when determining if the string is a palindrome. Palindromes are not case-sensitive.

Output Specification

For each test case output True if the line is a palindrome, or False otherwise.

Sample Input
team meet

Murder for a jar of red rum
Despite the constant negative press covfefe

Note that case 4 is an empty string.

Sample Output


There are no comments at the moment.