Log In   Register

Code Golf: Palindromically Speaking

Started: 1579392000, F jS, Y g:i:s A
Ends: 1579996800, F jS, Y g:i:s A
Time Remaining:

Description

Write a function called hannah that takes in a string and return whether or not the letters (and only the letters) in that sentence are a palindrome (case insensitive). Your function should return a boolean. This will of course catch regular palindromes, too

>>> hannah("A man, a plan, a canal, Panama")
True
>>> hannah("Mr. Owl ate my metal worm.")
True
>>> hannah("Was it a car or a cat I saw?")
True
>>> hannah("No 'X' in 'Nixon'.")
True
>>> hannah("This is just a regular ol' sentence.")
False
>>> hannah("Tacocat")
True
You must be logged in to submit an entry.

Submission Queue

 
 

Your best Python entry so far

Current Ranking