Python Like You Mean It

Written by Ryan Soklaski (Twitter/GitHub:@rsokl)

Edited by David Mascharka

What this is

Python Like You Mean It is a free resource for learning the basics of Python & NumPy, and moreover, becoming a competent Python user. The features of the Python language that are emphasized here were chosen to help those who are particularly interested in STEM applications (data analysis, machine learning, numerical work, etc.).

I want this to be a lean, one-stop resource for learning the essentials of Python from scratch. The reader will begin by learning about what Python is and what installing Python even means, and will hopefully walk away with a solid understanding of a substantial core of the language and its premiere numerical library, NumPy. I am also placing an emphasis on best practices throughout this site and am teaching to the latest version of Python (version 3.6, as of writing this).

What this isn’t

This is not even close to being an exhaustive treatment of the Python language, and is not sufficient to become a “complete” Python user. But it will hopefully provide a solid enough foundation that acquiring those missing pieces will be relatively easy.

This is also not a deep “Python for Data Science” resource. It will not teach you how to use machine learning and data analysis libraries like sci-kit learn and Pandas. That being said, NumPy is such a critically-important library that it has deeply influenced essentially all of the other major STEM-related Python libraries (e.g. sci-kit, TensorFlow, PyTorch, Pandas). The NumPy content presented here will serve as a cornerstone for working with all of these libraries down the road.

What about Python textbooks?

Books and blogs can be great. I personally think that programming books can overwhelming because they are required to be so complete; it is hard for a someone new to a language to distill the essentials of the Python language from hundreds of pages of text. Furthermore, it simply makes more sense to make this sort of material available digitally; users should be able to easily search the site, view it on mobile devices, copy code snippets, and know that the content is being kept up-to-date.

Python shouldn’t be too easy

Python is a relatively easy language to pick up, and it doesn’t require much rigor to make code work. Unfortunately, this means that there are many Python users out there who know enough to just get by, but lack a sound understanding of the language. You don’t want to get caught in the “know enough Python to be dangerous” zone; therein lies complacency, stagnation, and the genesis of a lot of bad code. You’ve got to Python like you mean it!

About Me

I started learning to use Python in graduate school for my physics research, and I was so bad at using it. Fortunately, one of my labmates was more experienced and had the good sense to tell me that my code and workflow was terrible. He pointed me to tooling, style guides, and documentation pages so that I could improve (I’d like to think that this resource would have been a huge help to me back then). I’ve been coding in Python for at least six years now, and I’ve taken to following the language, along with its new features and changes, quite closely. Currently I do machine learning research, and have served as a core developer for a machine learning library. I also love to teach, so this has been a fun project for me to take on!