Skip to content

Instantly share code, notes, and snippets.

View Codehunter-py's full-sized avatar
🏠
Working from home

Ibrahim Musayev Codehunter-py

🏠
Working from home
View GitHub Profile
@Codehunter-py
Codehunter-py / parts-of-string.py
Created November 29, 2021 00:11
Modify the first_and_last function so that it returns True if the first letter of the string is the same as the last letter of the string, False if they’re different.
def first_and_last(message):
if not message or message[0] == message[len(message)-1]:
return True
else:
return False