Start the year with better Python fluency

It’s 2020, and there has never been a better time to be a Python developer. Just about every company is adopting Python — for data science, devops, automated testing, or Web applications.

There are also lots of ways to learn Python: In-person courses, online courses, books, YouTube videos, and the like.

If you’re like many people, then even after you’ve learned Python, you still don’t feel 100% fluent. You’re still searching on Stack Overflow or on Google. You aren’t completely sure how the syntax works, or in what situations you want to use different data structures.

It’s for this reason that I run “Weekly Python Exercise,” a family of courses designed to help Python developers to improve their fluency. Over the course of 15 weeks, you’ll solve problems meant to help you deepen your understanding of Python.

Between the problems, detailed solutions, private community forum, and live office hours, WPE all but guarantees that you’ll become a better Python developer — able to do more in less time, and take on bigger and more complex projects.

On January 14th, I’ll be starting a new cohort of WPE A1: Data structures for beginners. This course is perfect for you if:

  • You’ve been using Python for less than a year, and don’t quite feel comfortable with all of the different data types
  • You want to become more fluent with strings, lists, tuples, dicts, and sets
  • You want to know how to maximize the use of these data types
  • You want to stop relying on (and copying from) Stack Overflow so much

Lots of additional information about this course, including a sample set of exercises, is available at the Weekly Python Exercise site.

Questions or comments? Or do you qualify for one of my many discounts? Just e-mail me at, or hit me up on Twitter at @reuvenmlerner. I’ll answer your question as soon as I can.

But don’t delay! WPE A1 starts on January 14th, and won’t be offered until 2021. Which sounds even more futuristic and distant than 2020.

Ace Python Interviews — a new, free course to help you get a better job

It’s hard to exaggerate just how hot Python is right now. Lots of companies — from small startups to the Fortune 100 — have realized that Python allows them to do more in less time, and with less code.  This means, of course, that companies are scrambling to hire Python developers. There’s tons of demand, and not nearly enough supply. 

In other words: Now is a great time to be a Python developer! There are opportunities in just about every field, from Web development to system administration, devops to machine learning, automated testing to financial calculations.

If you’re going to get a Python job, you’ll first have to pass a Python job interview. And like everyone else, you’ll likely prepare for the interview by searching online for “Python interview questions,” or the like.

The good news: There are lots of sites offering Python interview questions and answers.

The bad news: I’ve looked at a lot of them, and they are terrible. The questions are often superficial, and the answers are often wrong or outdated. Plus, a programming interview isn’t a multiple-choice test, in which getting the right answer is the point. Rather, interviewers use the time with you to evaluate your depth of understanding, your coding process, and your ability to adapt as specifications change.

I’ve decided to do my part to change this: Today, I’m launching “Ace Python Interviews,” a new course that covers 50 questions you might be asked on a Python interview. The course has questions for beginner, intermediate, and advanced Python developers. Note that the questions aren’t about specific disciplines, such as Web development or data science; they’re about the core Python language.

The course consists of six hours of video screencasts, written and presented by me while using the Jupyter notebook. And yes, you can download the Jupyter notebooks I used from the course site.

Better yet: This new course is completely free. That’s right: I’m giving this course away, no strings attached. Watch the videos as often (or rarely) as you want — but watch them, learn the process of coding in Python, recognize where you can and should improve your Python skills… and then, go in and knock ’em dead at your interview.

If you’re looking to level up your Python skills, and get a better job using Python in the next year, then I’d suggest taking a look at “Ace Python Interviews.”

Better yet: If you have friends or colleagues who are looking to get a new job with Python, then be sure to mention my new course to them.  They might just learn some tips that’ll help them to wow the interviewers, and improve their careers.

Enroll in “Ace Python Interviews”

Join “Ace Python Interviews,” and get a better Python job today!

My Black Friday sale is live! Take 50% off any course in Python or data science

As promised, the Black Friday sale has begun in my online store. Through Monday, my courses and books are all 50% off with the coupon code BF2019.

This includes all eight of the video courses:

It also includes all six cohorts of Weekly Python Exercise that will start in 2020!  Pay only $50 (rather than $100) per cohort with the coupon code BF2019:

People have had very kind things to say about my courses.  For example:

  • “The exercises are perfect for me because they are right in my “wheelhouse”. I have enough background knowledge that the context of the problems is relevant in my experience, yet I can’t just rattle off the solutions instantly. I have to puzzle over them as I try to solve them. I do usually achieve my goal of coming up with a solution that I am pleased with prior to the answer coming out on the following Monday.”  — Doug (about WPE)
  • “I was a total python noob when I started.  I just wanted to learn the syntax, how to look at problems and find the solution. You provided both.  Of course I did a lot of reading too but your teaching is instrumental in drilling some concepts into our brains.” — Jean-Pierre (about WPE)
  • “It was an amazing course. Apart from comprehensions, you have provided lots of information about Python programming. The exercises were really challenging.” — Jonayed (about “Comprehending Comprehensions”)
  • “I really liked the way you went slow and explained everything in microscopic detail, acknowledging where the NumPy syntax is non-intuitive.”  — David (about “NumPy”)

Again, you can take advantage of this discount?  Just use the coupon code BF2019 at checkout.

But be sure to do it in the coming days — because as of Tuesday, this year’s Black Friday sale will be completely over.

Black Friday: All of my Python courses are 50% off!

This coming Friday is “Black Friday,” when many stores offer big discounts on their products. I’m happy to say that from Friday through Monday, every course in my online store will be 50% off.

This includes all eight of the video courses in my online store:

There’s a new course in there — my brand-new “Intro Python: Functions” course tells you everything you need to understand writing and using Python functions. It’s aimed at people with programming experience but without a lot of experience with Python.

Oh, and you might also have noticed that my Pandas course is now complete, weighing in at 12.5 hours of videos (!), along with a large number of exercises.

But wait, there’s more: In 2020, I’ll be offering all six versions of Weekly Python Exercise (3 for beginners, and 3 for more experienced developers). If you buy them during this sale, you’ll save 50%. The cohorts might not be starting for several months, but you can lock in this price, and then begin the course along with the other students when it begins.

I’ll have more information about my Black Friday sale later this week. And I hope that this Black Friday will be an additional milestone as you improve your Python fluency.

Questions? Comments? Thoughts? Contact me at, or on Twitter as @reuvenmlerner .


Podcasts, podcasts, and even more podcasts

I’ve recently appeared on a whole bunch of podcasts about Python, freelancing, and even (believe it or not) learning Chinese! If you’re interested in any or all of these subjects, then you might want to catch my interviews:

  • Talk Python to Me: I spoke with Michael Kennedy (and Casey Kinsen) about freelancing in Python — and things to consider when you’re thinking of freelancing.
  • Programming Leadership: I spoke with Marcus Blankenship about why companies offer training to their employees, how they should look for training, and how best to take advantage of a course.
  • Profitable Python: I spoke with Ben McNeill about the world of Python training — how training works (for me, companies that invite me to train, and the people in my courses), how to build up an online business, and the difference between B2C vs. B2B. You can watch the video on YouTube, or listen to the audio version of the podcast!
  • Teaching Python: I spoke with Kelly Paredes and Sean Tibor about what it’s like to teach adults vs. children, and what tricks I use to help keep my students engaged. I learned quite a bit about how they teach Python to middle-school students!
  • You Can Learn Chinese: I’ve been studying Chinese for a few years, and spent some time chatting with Jared Turner about my experience, how I continue to improve, and how my Chinese studies have affected my work teaching Python. The entire episode is great, and my interview starts about halfway through.

In related news, you might know that I’ve been a co-panelist on the Freelancers Show podcast for the last few years. The entire panel (including me) recently left the show, and we’re currently discussing how/when/where we’ll restart.

I’ll be sure to post to my blog here when there are updates — but if you’re a freelancer of any level (new or experienced) who might be interested in sharing your stories with us, please contact me, so we can speak with you when we re-start in our new format.

Last chance to join Weekly Python Exercise in 2019!

Over the last year, I’ve taught in-person Python classes to companies in the US, Europe, Israel, India, and China. I’ve taught people from a variety of backgrounds, from absolute beginners to seasoned Pythonistas who want to improve their skills in new areas. And I’ve taught everything from intro Python to data science.

For all of the differences in background, jobs, courses, and education, I consistently got one request: Everyone wants to improve their skills, so that they can program in Python more fluently and easily — solving their current problems more easily, and taking on larger ones.

If this describes you — a competent and experienced Python developer who wants to know more, understand more, and do more with Python — then the new cohort of Weekly Python Exercise, starting tomorrow, is for you.

(Yes, it starts tomorrow. That means that tonight is the deadline to join. Really!)

Join the many developers from around the world who have improved their Python skills, one week at a time, with Weekly Python Exercise. Over the 15-week course, you’ll learn to work with iterators, generators, decorators, objects, and threads. You’ll improve your testing skills with “pytest”. You’ll communicate with other people in our cohort via our private forum. You’ll participate in my live office hours.

And best of all: Each week, you’ll get that much closer to Python fluency and mastery. This is great for your own personal satisfaction, of course, but will also help your career.

Also: The next advanced level cohort will start in March 2020.  So if you’re an experienced Python developer looking to improve your skills, this will be your last chance to do so for several months.  (A new basic-level cohort will be starting in January.)

If the price of WPE seems steep, maybe you qualify for one of my discounts — for pensioners/retirees, students, and anyone living outside of the world’s 30 richest countries. I want to help as many people as possible to improve their Python fluency, no matter where they live or where they are in life.

So join me tomorrow at Weekly Python Exercise, and start improving your Python tomorrow!


Quick Python tip: “int” strips strings of whitespace

Let’s say you’re writing a Python program that asks the user to enter a number, so that you can double it:

>>> n = input("Enter a number: ")
Enter a number:

Just doubling what we get is a bad idea, though. If the user enters “123”, then we’ll get this:

>>> print(n*2)

What’s going on? The “input” function always returns a string. The trailing newline character is removed, but we’re always going to get a string. If we multiply a Python string by 2, we get a new string back — a doubled version of what the user entered.

The obvious solution would be to use “int” to convert the string. For example, we could do this:

>>> print(int(n)*2)

But wait: What if the user enters extra whitespace on either side? That is, what if they do this:

>>> n = input("Enter a number: ")
Enter a number:         123        

You can see that there are extra space characters on either side of the ‘123’, and it becomes even clearer if we do this:

>>> print(f'"{n}"')
"       123       "
>>> print(len(n))

To avoid potential problems, you might want to use “str.strip”, a great method that (by default) removes all whitespace (i.e., space, tab, newline, carriage return, and vertical tab) from the edges of the string. In other words:

>>> print(int(n.strip())*2)

Sure enough, this will work, removing any whitespace characters from the ends of “n”. But guess what: It’s not necessary! That’s because Python’s “int” class automatically strips whitespace on any string it gets as input:

>>> int('5')
>>> int('   5    ')
>>> int('\n\n\t\t  5\t\t\v\v\t\t\n\r')

This is true, even though the str.isdigit/str.isnumeric/str.isdecimal methods will return “False” if you apply them to a string containing whitespace.

But be careful: If you apply “int” to the empty string, you’ll get a “TypeError” exception. And if you call “int” without any arguments, you’ll get the integer 0 back.

So save a few seconds when you convert strings to integers, and don’t bother stripping them first! You can rely on “int” to do it for you.

Want to improve your Python fluency? Join Weekly Python Exercise!

A new cohort of Weekly Python Exercise, my family of courses to improve your Python fluency, starts on November 5th.

This time, it’s an advanced-level cohort. We’ll explore topics such as iterators, generators, decorators, objects, and threads.

The course’s structure is simple:

  • Every Tuesday, you get a new question, along with “pytest” tests to check yourself
  • On the following Monday, you get the solution and explanation
  • In between, you can discuss your solutions (and problems) with others in your cohort, on our private forum
  • I also hold live video office hours, where you can ask me questions about the exercises

Questions or comments? Or perhaps you’re eligible for one of my discounts? Read more at, or send me e-mail at

But don’t delay, because November 5th is coming up soon. And why miss out on improving your Python knowledge and fluency?


Early-bird pricing for Weekly Python Exercise ends tomorrow

My native language is English: I grew up speaking it at home and school, and it’s my preference when reading, writing, and speaking. I studied in US schools through 12 grade, and then got both a bachelor’s degree and a PhD at American universities.  I’ve been writing for years, including 20 years as a columnist at Linux Journal.

Am I fluent in English? Yes, I’d say so.  And yet, I’m always reading tidbits about the history of English, how to speak more clearly, and how sharpen the language I use when writing.

Why? Because fluency isn’t a video game, in which you get a flashing sign saying, “Achievement unlocked: You’re fluent!”  No matter how fluent you currently are, there are ideas, techniques, and practices that you can still learn. You can always become better. 

How do you improve your fluency? The best way, of course, is practice. No matter how fluent you already are, more practice is always good.  As the old saying goes, the best way to become a good writer is to write. And the best way to become a better speaker is to speak.  And so forth.

What’s true for English, and other languages, is true for programming languages, as well.  If you want to be a better Python programmer, then you should be writing Python code, making mistakes, and learning from those mistakes.  Better yet, you should be discussing your mistakes (and techniques) with others, so that you can compare ideas and techniques, and learn from your peers.

This is the thinking that has driven my work with Weekly Python Exercise. Each of the six WPE courses is designed to help you become a more fluent programmer.

A new advanced-level cohort is starting on November 5th. But tomorrow (Tuesday, October 29th) is the last day you can sign up for the early-bird price of $80.

Here’s what some people have said about previous cohorts of WPE, when asked what they thought:

  • I was a total python noob when I started.  I just wanted to learn the syntax, how to look at problems and find the solution. You provided both… your teaching is instrumental in drilling some concepts into our brains.
  • I learned a lot of features of the language and had a fun time doing it. I also got to apply what I learned when programming for work.
  • I expected to see Python in real world examples. I am not disappointed, because during WPE there were many these examples with wide varieties of programming blueprints.
  • The exercises are perfect for me because they are right in my “wheelhouse”. I have enough background knowledge that the context of the problems is relevant in my experience, yet I can’t just rattle off the solutions instantly.

If you use Python on a regular basis, but still feel that you can learn more about advanced techniques: Iterators, generators, decorators, comprehensions, inner functions, threading, and useful PyPI packages, then Weekly Python Exercise is for you.

Early-bird pricing ends on Tuesday evening. After that, you can still sign up, but you’ll pay the full price (i.e., $100).  Why delay?

Click here to learn more about Weekly Python Exercise, and become a better Python developer.