Python Forum

Full Version: finding almost palindromes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi i'm studying how to code with python and we were given an assignment to write a code that finds almost palindromes.
The code has to, given a certain string, check if by deleting one of the characters in the string it becomes a palindrome.
can you give me a hint on how to start?
I would start with code that detects a palindrome. Then identify (without worrying about the code) what method you would use for identifying "almost palindromes." After you've done those two things separately you should start thinking about your final code.