def is_palindrome(input_string):
# We'll create two strings, to compare them
if input_string[0:] == input_string[-1:]:
return True
else:
return False
expected output is below:
print(is_palindrome("Never Odd or Even")) # Should be True
print(is_palindrome("abc")) # Should be False
print(is_palindrome("kayak")) # Should be True
I am currently getting False for all cases. I know my splicing might be off on the -1. I already tried swapping the colon around to no avail.