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 onto your keyboard. Your day-to-day tasks have become significantly easier as a result of Python, and you’re comfortable using it ...

Read More

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 the following: for one_line in open('c:\abc\def\ghi'): print(one_line) The above code looks like it should work. But it almost certainly doesn’t. ...

Read More

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, Cisco, Ericsson, HP, PayPal, SanDisk, and VMWare) to become better Python developers. My students are are experienced, intelligent engineers who ...

Read More

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 function object.  So when I say: def foo():      return "I'm foo!" Python creates a new function object.  Inside of ...

Read More