Last active
September 8, 2024 17:55
-
-
Save chriscarrollsmith/818a42a2b9a038d619a2fca8af98e1cf to your computer and use it in GitHub Desktop.
That feeling when you're falling in love with Python for the very first time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def greet(): | |
# You are my heart | |
my_heart = {"my <3": "you"} | |
# My heart stops when you enter the room | |
sentiment = "Be still, my beating <3!".replace("beating ", "") | |
# Unlock me baby | |
key_to_my_heart = list(my_heart.keys())[0] | |
# I carve out my heart and replace it with you | |
epiphany = sentiment.replace(key_to_my_heart, my_heart[key_to_my_heart]) | |
# Well, hello there ;) | |
come_on = epiphany.replace("Be still", "Hello") | |
# You are my world | |
afterglow = come_on.replace("you", "world") | |
# I roll over in the morning and whisper, | |
return afterglow | |
greet() | |
# 'Hello, world!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment