Python Tutorial - Counting Beers
You’re 4 beers into studying. And because you like crappy beers, you write down the following beer you drank on your list:
If any of these beer companies want sponsor my website, I’ll happily remove your shitty beer and put up some other shitty competitor’s beer
Let’s say you want to print out the fourth element (“Miller Lite”) in this list. You’d probably type:
That would result in “Index error: Out of Range”. What kind of communist shithole decided how to count in programming? Here is something that confuses the fuck out of every new, young, sassy man or gentlewoman. Programmers don’t start counting at 1. They start counting at fucking 0. Zero. One less than one. How do we get Miller Lite from that list again?
Welcome to the bane of your existence and source of half of your debugging errors until you get this crap hammered into your noggin. Let me make this real easy:
Programmers measure their sobriety not by counting the first beer, but by counting when they were sober and hadn’t touched beer yet. Remember this, and I hope you’re one more beer deeper than when you started reading this. If not, fix it.
Leave Python Tutorial - Counting Beers to:
Read more #python posts
Best Posts From Redheaded Python
We have not curated any of redheadedpython's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Redheaded Python
- Feedback wanted for Random Insult Generator
- Top tips for webcam girls
- NEX Wants to Violate Your Privacy and Data
- Flappycoin now on sale!
- TrumpCoin and the very best review ever made ever
- Who is going to buy Spankchain?
- How to set up a Desktop Electroneum Miner in Windows
- Fuck Reddit
- Formatting Strings in Python - Caitlyn Jenner's Sex Change
- Python Tutorial - Counting Beers