Python  1.0
Functions
_06c_frase_palindroma Namespace Reference

Checking for palindrome phrases. More...

Functions

def isPhrasePalindrome (st)
 Checks whether a phrase is a palindrome. More...
 
def main ()
 

Detailed Description

Checking for palindrome phrases.

Exemplos:

  1. "Anotaram a maratona"
  2. "Sairam o tio Sa e as oito Marias"
  3. "Roma me tem amor"
  4. "Socorram-me, subi no onibus em marrocos"

Function Documentation

◆ isPhrasePalindrome()

def _06c_frase_palindroma.isPhrasePalindrome (   st)

Checks whether a phrase is a palindrome.

The only difficulty here is to remove spaces, accents and punctuation from the String.

Parameters
ststring to be tested.
Returns
True if s is a palindrome phrase, and False otherwise.

Referenced by main().

◆ main()

def _06c_frase_palindroma.main ( )