“How to Python” Series Now Features Source Code

How to Python Series Now Features Source Code Featured Image

Chances are you found this website through one of my Python articles. After all, in over 300+ articles, my most popular articles by far are all in my How to Python series. Don’t believe me? Check out my 2019 review. Naturally, over the years, I’ve tried to improve that series by adding YouTube videos, performance metrics, and even challenges. Well, now I’m releasing the How to Python series source code.

All code from the How to Python series can now be found in a GitHub repoOpens in a new tab.. In particular, I’ve chosen to store all code snippets as Jupyter Notebooks, so you can run them in Google Colab. Head on over to the repo to check it out. Otherwise, keep reading for more details.

Table of Contents

Growing a Series

If you’ve been around, you know I started building up Python resources as soon as I picked up the language back in 2017. Since then, I’ve had a lot of fun expanding the series with articles while also freshening up the old content. For instance, each article used to feature just the code snippets. Now, many of them feature performance metrics and challenges.

To further grow the series, I started making YouTube videos that essentially repeat the content. In other words, each video features all the same code snippets with a bit of my own commentary. In a weird way, the articles function as my script.

At this point, the How to Python series features 21 articles and 8 YouTube videos. Now, I’m trying the continue this growth by introducing source code which you can clone, modify, and even share. In the next section, we’ll take a look at what that means.

Adding Source Code

Recently, I’ve been taking a grad course called Advanced Artificial Intelligence. In that course, I’ve been gaining some exposure to Jupyter NotebooksOpens in a new tab. which allow you to embed Python code and text in a document. Even better, Google ColabOpens in a new tab. offers an easy way to run that code in your browser. Naturally, I felt this would be a good fit for the series.

As a result, I created a GitHub repo called How to Python CodeOpens in a new tab. which includes a collection of Jupyter Notebooks, one for each article. At this moment, the project isn’t fully fleshed out, but there are a few notebooks already. For instance, you can check out the How to Write a Loop notebook hereOpens in a new tab..

To make the collection easier to navigate, I’ve included a table in the README which links all of the articles in this collection as well as their respective notebooks if they exist. Each notebook link will take you directly to Google Colab where you can play around with each snippet.

My goal with this collection is to give newbies a chance to interact with the code snippet. Meanwhile, I wanted to give more experienced coders a chance to vet the code and even potentially provide updates or changes. Apparently, that’s something that some of you are interested in:

Request for a GitHub Repo by Michael Kennedy

Plans for the Future

At this time, the code isn’t easy to edit unless you’re comfortable with Jupyter Notebooks. I’m currently interested in trying to find a way to add raw Python snippets to the repo, so you can edit them directly. I know there is a way to import local Python code into a Jupyter Notebook. I’m just not sure how to make that compatible with Google Colab.

Beyond that, I plan to maintain that repo as a way to catalog posts from the series. At the moment, the table displays publish dates and links, but it might be cool to include other information as well. If you have any ideas, let me know!

In the meantime, I’d love it if you stuck around to check out a few posts from the series. For instance, here are a few of my favorites:

Likewise, you can continue supporting the site by becoming a patronOpens in a new tab. or even subscribing to my YouTube channel. If none that sounds interesting right now, at least consider hopping on my mailing list. Otherwise, thanks for stopping by!

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife, playing Overwatch and Phantasy Star Online 2, practicing trombone, watching Penguins hockey, and traveling the world.

Recent Posts