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 it, and also send it to my students at the end of the day, so that they can review my ...
Here’s a short Python puzzle that I use in many of my on-site courses, which I have found to be useful and instructive: Given the following short snippet of Python, which letters will be printed, and in which order? print("A") class Person(object): print("B") def __init__(self, name): print("C") ...
Data science is changing our lives in dramatic ways, and just about every company out there wants to take advantage of the insights that we can gain from analyzing our data — and then making predictions based on that analysis. Python is a leading language (and some would say the ...
Get the bonus content: Cheat sheet: Python data manipulations Click here Just about every day of every week, I teach Python. I teach not only in Israel, but also in Europe, China, and the US. While I do teach newcomers to programming, the overwhelming majority of my students are experienced ...
A few days ago, well-known author and developer Zed Shaw wrote a blog post, “The Case Against Python 3.” I have a huge amount of respect for Zed’s work, and his book (Learn Python the Hard Way) is one whose approach is similar to mine — so much so, that ...
I love Python’s “zip” function. I’m not sure just what it is about zip that I enjoy, but I have often found it to be quite useful. Before I describe what “zip” does, let me first show you an example: >>> s = 'abc' >>> t = (10, 20, 30) ...