You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Python module that checks if given words or numbers are palindromes. The module should check a list of strings and numbers to determine if each one is a palindrome, meaning it reads the same forward and backward. The check should be done for multiple inputs using a for loop.
Expected Behavior:
The module should iterate over a list of strings and numbers.
For each input, it should remove non-alphanumeric characters and convert the string to lowercase.
It should then check if the cleaned string is a palindrome (i.e., if it reads the same forwards and backwards).
The output should print whether each input is a palindrome or not.
'Radar' is a palindrome.
'12321' is a palindrome.
'Hello' is not a palindrome.
'1.232.1' is a palindrome.
'12345' is not a palindrome.
'aA' is a palindrome.
'Test' is not a palindrome.
Notes:
The function should ignore spaces, punctuation, and be case-insensitive.
Edge cases such as empty strings or strings with special characters should be handled.
The for loop should handle multiple strings or numbers for palindrome checks.
The text was updated successfully, but these errors were encountered:
Palindrome Checker
Challenge Description:
Create a Python module that checks if given words or numbers are palindromes. The module should check a list of strings and numbers to determine if each one is a palindrome, meaning it reads the same forward and backward. The check should be done for multiple inputs using a
for
loop.Expected Behavior:
Example:
Input:
Output:
Notes:
The text was updated successfully, but these errors were encountered: