def first_and_last(message):
if (message[0] == message[3]):
return True
elif (message[0] != message[3]):
return False
print(first_and_last("else"))
print(first_and_last("tree"))
print(first_and_last(""))
I want to return True
if string is empty, True
if 1st and last letter of string match and False
otherwise.
How can I get a True
result for an empty string?