forked from MIT-Emerging-Talent/ET6-practice-code-review
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the README file for challenge_8
- Loading branch information
1 parent
2cff250
commit 8040098
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Challenge: Palindrome Detector | ||
|
||
## Description | ||
|
||
The "Palindrome Detector" challenge involves determining if a given string | ||
or bytes is a palindrome. | ||
A palindrome is a word, phrase, or sequence that reads the same backward as | ||
forward, ignoring spaces, punctuation, and case. | ||
|
||
Write a function that takes a string or bytes as input and returns `True` if | ||
it is a palindrome, and `False` otherwise. | ||
|
||
For example: | ||
|
||
- The string `A man, a plan, a canal, Panama` is a palindrome. | ||
- The string `hello` is not a palindrome. | ||
- The bytes `b"racecar"` is a palindrome. | ||
- The bytes `b"hello"` is not a palindrome. | ||
|
||
## Example | ||
|
||
```python | ||
is_palindrome("A man, a plan, a canal, Panama") | ||
# Output: True (ignoring spaces, punctuation, and case) | ||
|
||
is_palindrome("hello") | ||
# Output: False (not a palindrome) | ||
|
||
is_palindrome(b"racecar") | ||
# Output: True (ignoring spaces, punctuation, and case) | ||
|
||
is_palindrome(b"hello") | ||
# Output: False (not a palindrome) |