Python’s “subprocess” module makes it really easy to invoke an external program and grab its output. For example, you can say import subprocess print(subprocess.check_output(‘ls’)) and the output is then $
One of Python’s mantras is “batteries included.” which means that even with a bare-bones installation, you can do quite a bit. You can (and should) install packages from PyPI, but
Today is my birthday! To celebrate, I’m offering a one-day 47% sale on many of my products: My upcoming live classes (on functional Python, advanced Python objects, and decorators) are
If you’re like many of the Python developers I know, the basics are easy for you: Strings, lists, tuples, dictionaries, functions, and even objects roll off of your fingers and
Whenever I teach Python courses, most of my students are using Windows. And thus, when it comes time to do an exercise, I inevitably end up with someone who does
I have a great job. Really, I’m quite fortunate: For many years, I’ve spent nearly every day helping engineers at some of the world’s largest and best companies (including Apple,
For nearly two years, I have been teaching my introductory course in data science and machine learning to companies around the world. On the one hand, participants are excited by
In Python, we know that we can add two integers together: >> 2 + 2 4 And of course, we can add two strings together: >> ‘a’ + ‘b’ ‘ab’
What happens when we define a function in Python? The “def” keyword does two things: It creates a function object, and then assigns a variable (our function name) to that
Nearly every day, I teach a course in Python. And nearly every day, I thus use the Jupyter notebook: I do my live-coding demos in it, answer students’ questions using