Category: Python

  • Implementing “zip” with list comprehensions

    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) >>> zip(s,t) [(‘a’, 10), (‘b’,…

    Read more

  • Fun with floats

    I’m in Shanghai, and before I left to teach this morning, I decided to check the weather.  I knew that it would be hot, but I wanted to double-check that it wasn’t going to rain — a rarity during Israeli summers, but not too unusual in Shanghai. I entered “shanghai weather” into DuckDuckGo, and got…

    Read more

  • Speedy string concatenation in Python

    As many people know, one of the mantras of the Python programming language is, “There should be one, and only one, way to do it.”  (Use “import this” in your Python interactive shell to see the full list.)  However, there are often times when you could accomplish something in any of several ways. In such…

    Read more

  • Another free regexp Q&A webinar!

    The last Webinar I did, with Q&A about regular expressions, was great fun — so much, that I’ve decided to do another one. So, if you have questions (big or little) about regular expressions in Python, Ruby, JavaScript, and/or PostgreSQL, sign up for this free Webinar on Monday, April 11th: https://www.crowdcast.io/e/regexpqa2 If you already have…

    Read more

  • Free Webinar: Regexp Q&A

    To celebrate the publication of my new ebook, Practice Makes Regexp, my upcoming Webinar (on March 22nd) is all about regular expressions (“regexps”) in Python, Ruby, JavaScript, and PostgreSQL, as well as the Unix “grep” command. Unlike previous Webinars, in which I gave a presentation and then took Q&A, this time will be all about…

    Read more

  • Yes, you can master regular expressions!

    Announcing: My new book, “Practice Makes Regexp,” with 50 exercises meant to help you learn and master regular expressions. With explanations and code in Python, Ruby, JavaScript, and PostgreSQL. I spend most of my time nowadays going to high-tech companies and training programmers in new languages and techniques. Actually, many of the things I teach…

    Read more

  • All 50 “Practice Makes Python” screencasts are complete!

    I’m delighted to announce that I’ve completed a screencast for every single one of the 50 exercises in my ebook, “Practice Makes Python.”  This is more than 300 minutes (5 hours!) of Python instruction, helping you to become a more expert Python programmer. Each screencast consists of me solving one of the exercises in real-time,…

    Read more

  • Free Webinar: Pandas and Matplotlib

    It’s time for another free hour-long Webinar! This time, I’ll be talking about the increasingly popular tools for data science in Python, namely Pandas and Matplotlib. How can you read data into Pandas, manipulate it, and then plot it? I’ll show you a large number of examples and use cases, and we’ll also have lots…

    Read more

  • Reminder: Free Webinar on data science in Python

    There’s still time to register for my free, one-hour Webinar on data science in Python, which will be tomorrow (Tuesday).  There’s clearly too much material for me to give just one Webinar, so this will be the first in a series that I’ll be offering over the coming months.  But if you’re interested in hearing…

    Read more

  • Free Webinar: Data science with Python on December 8th

    It’s time for me to do another free one-hour Webinar, this time about data science with Python. It’ll be on December 8th, at 9 p.m. GMT. Data science is all the rage, and rightly so — and Python is one of the best-known and best-equipped languages in which to do it.  In this Webinar, I’ll…

    Read more