Skip to content

jwaldrep/palindrome

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

palindrome.py

Description

A simple script to test if user-supplied text is a palindrome using 3 different methods, ignoring case and any non-letter characters or punctuation. This script uses string substitution with regular expressions to clean text, as well as recursive and iterative versions of the palindrome checking function.

Requirements

  • Python 3
  • (Optional) The included test suite (test.sh) requires roundup (brew install roundup for OSX)

Notes

Letter casing and punctuation do not matter when testing a palindrome. All of the following are valid palindromes:

  • stunt nuts
  • Lisa Bonet ate no basil.
  • A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal: Panama!
  • Doc, note, I dissent. A fast never prevents a fatness. I diet on cod.

Additional Resources

About

W1D2 Homework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.0%
  • Shell 35.0%