string = (input("Enter your own string: "))
if string == string[::-1]:
print("This is a Palindrome")
else:
print("This is not a Palindrome")
I want this code to not care about lower or upper case please
string = (input("Enter your own string: "))
if string == string[::-1]:
print("This is a Palindrome")
else:
print("This is not a Palindrome")
I want this code to not care about lower or upper case please
First either convert the string to all lower or upper characters like this;
new_str = string.lower()
if new_str == new_str[::-1]:
...rest of your code here