Goedendag, Python 3

1. Opening This Book
Pretend that you’ve opened this book (although you probably have opened this book), just to find a huge snake right in the middle crease of the book. (The manufacturer of the book has included the snake at my request.)
So you’re like, “Wow, this book comes with a snake!” (Even if you don’t particularly like a snake, I’m sure you can appreciate the logistics of shipping any sort of produce discreetly inside of an alleged programming manual.)
Then you ask yourself, “Wait a minute. I thought this was a book on Python, the easy-to-read, beginner-friendly programming language originally from the Netherlands and now used worldwide. " And although one can appreciate the logistics of shipping, you may still ask: "But why a snake? What am I supposed to do with it?"
No. Please don’t puzzle over it. You don’t need to do anything with the snake.
You may have noticed the two interlocking snakes in the Python logo above. This Mayan-derived symbol is no accident. In Mayan culture, these interlocking snakes represent duality, creation and destruction wrapped together as one. Together the snakes hint at Python's awesome power.
You don't need to do anything with the snake. Set your snake aside and let it do something with you.
I’ll be straight with you. A snake bite can cause you to cry. To weep. To whimper sweetly. This book is a poignant guide to Python. That means code so beautiful that tears are shed. That means gallant tales and somber truths that have you waking up the next morning in the arms of this book. Hugging it tightly as a snake hugs its prey. If necessary, fashion a makeshift hip holster for Why’s (Poignant) Guide to Python, so you can always have this book’s tender companionship.
You really must sob once. Or at least sniffle. And if not, then the snake bite can make it all happen for you.
Now you may be thinking: 'What's with the purple text and all the irrelevant side bars?' Now this book is about learning Python, that's for sure. But interspersed in the lessons are whimsical and not so relevant tales of distant lands, organ instructors, and my cat Blix. To differentiate riveting story from boring Python lectures, we will be using a purple tint text for all unessential story texts, which you can choose to skim or skip at your leisure.
2. The Red Sun Rises
So, now you’re wondering why I changed my mind about Python. The quick answer is: we clicked.
Like when you meet Somebody in college and they look like somebody who used to hit you in the face with paintbrushes when you were a kid. And so, impulsively, you conclude that this new Somebody is likely a non-friend. You wince at their hair. You hang up phones loudly during crucial moments in their anecdotes. You use your e-scooter right there where they are trying to walk!
Six months later, somehow, you and Somebody are sitting at a fountain having a perfectly good chat. Their face doesn’t look so much like that childhood nemesis. You’ve met the Good Twin. You clicked.
So whereas I should probably be pounding your teeth in with hype about Python and the tightly knit cadre of pertinent acronyms that accompany it everywhere (whetting the collective whistles of your bosses and their bosses’ bosses), instead I will just let you coast. I’ll let you free-fall through some code, interjecting occasionally with my own heartfelt experiences. It’ll be quite easy, quite natural.
I should offer you some sort of motivation, though. So, Smotchkkiss, I’m going to give my three best reasons to learn Python and be done with it.
-
Brain health.
Vitamin P. Goes straight to the head. Python will teach you to express your ideas through a computer. You will be writing stories for a machine. Creative skills, people! Deduction. Reason. Nodding intelligently. The language becomes a tool for you to better connect your mind to the world (without a USB adapter).
Now, I’ve noticed that many experienced Python users seem to be clear thinkers—simple and objective (in contrast to this heavily biased course). That is because Python prefers explicit instructions over assumptions, as well as easy-to-follow logic over complex expressions. The Zen of Python states, "In the face of ambiguity, refuse the temptation to guess. There should be one—and preferably only one—obvious way to do it. Although that way may not be obvious at first unless you're Dutch."
-
One man on one island.
Python was born in the Netherlands. Which is freaky. The Netherlands is not known for its software. And since programming languages are largely written in English, who would suspect Python to come from the native Dutch?
And yet, here we have Python. Against the odds, Guido van Rossum created Python in December of 1989. For the past decades, Python spread to a worldwide audience becoming the #1 language on GitHub and powers nearly 100% of the foundational open-source packages in AI and machine learning. It’s triumphant and noble and all that.
-
Free.
Using Python costs nothing. The code to Python itself is open for all of the world to inhale/exhale. Heck, this book is free. It’s all part of a great, big giveaway that should have some big hitch to it.
You’d think we’d make you buy vacuums or timeshares or fake Monets. You’d think there’d be a 90-minute presentation where the owner of the company comes out at the end and knuckles you into sealing the deal.
Nope, free.
With that, it’s time for the book to begin. You can now get out your highlighter and start dragging it along each captivating word from this sentence on. I think I have enough hairspray and funny money on my person to keep me sustained until the final page.
3. How Books Start
Now, if you ever have read a book, you know that no book can properly start without an exorbitant amount of synergy. Yes, synergy. Maybe you didn’t know this. Synergy means that you and I are supposed to cooperate to make this a great reading experience.
We start off the book by getting along well in the Introduction. This togetherness, this synergy, propels us through the book, with me guiding you on your way. You give me a reassuring nod or snicker to indicate your progress.
I’m Peter Pan holding your hand. Come on, Wendy! Second star to the right and on till morning.
One problem here. I don’t get along well with people. I don’t hold hands very well.
Any of my staff will tell you. At the Opening Ceremonies of This Book (a catered event with stadium seating), I discovered that the cucumber sandwiches weren’t served in tea towels. As a result, the butter hadn’t set with the cucumbers right… Anyways, I made a big scene and set fire to some of the advertising trucks outside. I smashed this spotlight to pieces and so on. I had this loud maniacal laughing thing going on deep into that night. It was a real mess.
But, since I don’t get along well with people, I hadn’t invited anyone but myself to the Opening Ceremonies of This Book. So it wasn’t really that embarrassing. I kept it under wraps, and no one found out about the whole ordeal.
So you’ve got to know that synergy doesn’t actually mean synergy in this book. I can’t do normal synergy. No, in this book, synergy means cartoon foxes. What I’m saying is this book will be starting off with an exorbitant amount of cartoon foxes.
And I will be counting on you to turn them into synergy.
Wasn't this book written by _why?
Wasn't this Poignant book originally hand drawn and penned about Ruby by Why the Lucky Stiff aka _why. Yes
Python is the natural next language to share _why's poignant lessons. Ruby and Python are remarkably similar. Both languages were created in the 1990s, rebelling against the verbose, rigid, and complex syntax of languages like C/ C++ and Java. Both prioritize human readability, programmer happiness, and rapid development speeds over machine execution efficiency. And both share identical foundational design goals, lineage, and execution models.
Didn't _why commit digital suicide and disappear from the web without a trace? Yes and no.
"When you treat programming as an art, when you treat software as an artistic medium, when you spread joy and whimsy with what you do, you are _why." says Steve Klabnik, a prominent member of the Ruby programming community. Anyone that continues the legacy of whimsy and fun in programming carries the torch of _why.
So, thank you _why. Hope this book opens _why's whimsical learning style to anyone looking to create new worlds on their computers.
What I'm Going to do With Massive Proceeds from this Book?
Anyone who’s written a book can tell you how easily an author is distracted by visions of grandeur. In my experience, I stop twice for each paragraph, and four times for each panel of a comic, just to envision the wealth and prosperity that this book will procure for my lifestyle. I fear that the writing of this book will halt altogether to make way for the Osho style armada of 93 Rolls-Royce that are rolling down the imaginary streets in my head.
Rather than stop my production of the (Poignant) Guide, I’ve reserved this space as a safety zone for pouring my empty and vain wishes.
Today I was at this Italian restaurant, Granado’s, and I was paying my bill. Happened to notice (under glass) a bottle of balsamic vinegar going for $150. Fairly small. I could conceal it in my palm. Aged twenty-two years.
I’ve spent a lot of time thinking about that bottle. It is often an accessory in some of these obsessive fantasies. In one fantasy, I walk into the restaurant, toss a stack of greenery on the counter and earnestly say to the cashier, “Quick! I have an important salad to make!”
In another, related fantasy, I am throwing away lettuce. Such roughage isn’t befitting of my new vinegar. No, I will have come to a point where the fame and the aristocracy will have corrupted me to my core. My new lettuce will be cash. Cold, hard cash, Mrs. Price.
Soon, I will be expending hundreds for a block of myzithra cheese.
My imaginations have now gone beyond possessions, though. Certainly, I have thought through my acquisition of Grecian urns, motorcades, airlines, pyramids, dinosaur bones. Occasionally I’ll see wind-tossed cities on the news, and I’ll jot down on my shopping list: Hurricane.
But now I’m seeing a larger goal. Simply put: what if I amassed such a fortune that the mints couldn’t print enough to keep up with my demand? So, everyone else would be forced to use Fortnite's V-Bucks as actual currency. And you would have to win in Fortnite games to keep food on the table. These would be some seriously tense gaming. I mean, you go to play Battle Royale and your kids start crying.
You’ve got to hand it to fun money, though. Fake money rules. You can get your hands on it so quickly. For a moment, it seems like you’re crazy rich. When I was a kid, I got with some of the neighborhood kids, and we built this little Tijuana on our street. We made our own pesos and wore sombreros and everything!
One kid was selling hot tamales for two pesos each. Two pesos! Did this kid know that the money was fake? Was he out of his mind? Who invited this kid? Didn’t he know this wasn’t really Tijuana? Maybe he was really from Tijuana! Maybe these were real pesos! Let’s go make more real pesos!
I think we even had a tavern where you could get totally hammered off Kool-Aid. There’s nothing like a bunch of kids stumbling around, mumbling incoherently with punchy red clown lips.