Last chance: Weekly Python Exercise B3 starts tomorrow!

Want to improve your Python skills? Looking for a way to practice on a regular basis, backed up by a community of learners?

Look no more: A new advanced-level cohort of Weekly Python Exercise is starting tomorrow! If you’ve been using Python for at least a year, then this course will open your eyes to new techniques, and help to strengthen existing ones.

Here’s how it works:

  • Every Tuesday, you’re sent a new problem via e-mail, along with “pytest” tests
  • On the following Monday, you get the solution, with a detailed explanation.
  • In between, you can chat in our private forum about your solution (and theirs).
  • Once a month, I do free, live office hours, answering your Python questions.

But wait, there’s more: As of this cohort (B3), every solution will not only be written up in e-mail, but will also be answered in a screencast! I hope that this will help you to understand the solutions better than in pure text.

Questions? Comments? Wondering about discounts? Just contact me at @reuvenmlerner on Twitter, or send me e-mail at

But don’t hesitate; I won’t be offering this cohort again until 2021…

Click here for more info about Weekly Python Exercise

Improve your Python skills in 15 weeks — with Weekly Python Exercise!

If you’ve been using Python for a year or so, then you’re no longer confused or surprised by the language’s basics — the core data structures, functions, and even basic object-oriented programming. But you probably don’t quite feel fluent with Python, and aren’t sure how to use some of the language’s more advanced features. It would sure be nice to understand these things better, not just by reading a blog, but via actual, hands-on practice.

If that describes you, then you should check out Weekly Python Exercise, the course that helps you to level up your Python skills. A new advanced-level cohort (B3) starts on Tuesday, October 27th, and works as follows:

  • Every Tuesday, you get a new question, along with “pytest” tests
  • On the following Monday, you get a detailed solution
  • You can ask questions and compare notes with other students in our private forum
  • I offer monthly office hours, answering your Python questions

(If you’re a Python beginner, then a new A-level cohort be starting in January. You can learn more at

Want to know more, or see some sample exercises? Go to

Questions? Ask away! I’m on Twitter as @reuvenmlerner, or you can e-mail me at

Ask me anything!

Later this month, I’ll appear on the “Exploiting with Teja Kummarikuntla” podcast. As part of that appearance, I’ll be doing an AMA (“ask me anything”) segment — but in order for that to happen, I need questions!

That’s where you come in: If there’s a question that you would like for me to answer, then please go ahead and submit it at Possible topics include:

  • Python
  • Life as a corporate trainer
  • Writing books
  • Running an e-mail newsletter
  • Running your own business (which I’ve done since 1995)
  • Creating and selling online books and courses

If you have questions on other topics, then go ahead and submit those, too!

I’m really looking forward to appearing on the podcast, and to answering your questions.


What’s the easiest way to boost your career as a software developer? Learn to touch type.

I’ve been a professional programmer for about 30 years, self-employed for 25 years, and doing full-time corporate Python training for more than a decade.

I run a small business, which involves me writing, programming, and teaching, as well as handling all of the business-related stuff.

So, what’s my most important skill, the thing that helps me get lots accomplished in a short period of time? Easy: My ability to touch type.

It all started when I was in high school in the mid-1980s. I would use my family’s computer — yes, in those days, the entire family shared one — for schoolwork, for doing some introductory programming, and even writing newsletters for my high-school youth organization. The thing is, I was doing all of this typing with two fingers, and this drove my parents bananas.

Both of my parents can touch type. In those days, it was typical for office workers to record their correspondence, give the recording to a secretary, and then review the result before sending it out. My father never did that, because he typed at least as fast as his secretary, and the whole dictation process would slow him down. It wasn’t unusual to hear the rat-tat-tat of my father typing from his study at home.

It’s no surprise that it bothered my parents to be hunting and pecking. I was pretty fast at it, but I was no match for my father or any other touch typist. My parents strongly encouraged me to learn to touch type, but I was a teenager, which meant that I knew better than they did. And besides, I type fast enough, right?

Finally, my parents set a new rule: For every hour that I used the computer, I had to spend an hour doing a lesson from a touch-typing book. (How quaint, right?) I yelled. I screamed. I cried. I protested. But my parents didn’t budge.

At first, it was painful: When you start to touch type, you are learning to use your hands in a new way, one that feels completely foreign. You also type much more slowly than you did before, and feel like you’re wasting your time. I certainly had these feelings, and when I had to get something done quickly, I would refer to my old two-finger method.

But within two or three weeks, I was already touch typing as quickly as I did with two fingers. Better yet, and somewhat amazingly, I was able to type without looking at the keyboard! I could enter passages from a book, without having to move my eyes from book to keyboard and back. I could talk to someone while typing. I could even sneak a peak at the TV while I was typing.

Achieving true speed didn’t happen for a while. But when I started college in the fall of 1988, I was already typing at a pretty fast clip. At the student newspaper, I was frequently drafted to take printouts from the Associated Press and type them into our “world and nation” section. And at the computer labs, where we had loud, mechanical IBM keyboards, people would ask me if I could type more slowly, because the rat-tat-tat was disturbing them.

Fast forward to 2020, and I cannot imagine my work without being able to touch type:

  • Just about every day, I teach Python programming to my corporate clients. Rather than using slides, I live-code, talking while looking at my students (or the screen). I describe what I’m typing as I do it, and type at the same speed as I speak.
  • Similarly, the online video courses and YouTube videos that I’ve created wouldn’t be possible were it not for touch typing.
  • I can type at about the same speed as I think, meaning that when I have ideas I want to put into an article, blog post, or book, I can just sit down and write. This doesn’t mean that my text can get away without editing — but I can’t imagine the writing and editing process if typing weren’t a natural extension of my thought process.
  • When I speak with a potential new client, I can take notes in real time, while holding the conversation.
  • I can write and respond to e-mail quickly and easily. (This is something of a curse; I never learned to write short e-mail messages. It’s always full sentences, and typically full paragraphs, from me.)

Lots of professional writers know that they need to touch type. After all, they write for a living, and being unable to get the most out of their keyboard would seem like a crazy thing to do.

And yet, I find that a small number of the developers in my courses can touch type. They never really thought about it that much, or decided not to put time and effort into it, or thought that it was hard or impossible to learn. But it’s definitely not a priority.

Touch typing looks magical and impossible to achieve. It’s like watching a virtuoso pianist expressing themselves through the instrument, their thoughts and feelings flowing effortlessly from their brains to their hands, and then to the piano.

But here’s the thing: It’s not hard to learn. You’ll be frustrated for the weeks during which you’re learning and forcing yourself to work in a new way. But it pays for itself in spades, allowing you to write, edit, and express yourself — in code and text — more easily than you could ever imagine. And if I managed to learn from a book as an angry teenager, then you can certainly learn with the variety of online tools, many of them free, available today.

So if you want to give your career a boost, don’t go and learn the latest language, JavaScript library, or API. Rather, learn to touch type. The time that you save and the flexibility it’ll provide will more than make up for the time you spent learning.

Improve your Python fluency with “Python Workout” — today’s “Deal of the Day”

Whether you’re a developer, devops engineer, or data scientist, you’re likely using Python. But do you really know the language, or do you find yourself copying and pasting from Stack Overflow on a regular basis, hoping that the solution you’ve found will solve your problem without too much editing?

The best solution to this problem is practice. And in my book, Python Workout (, I provide you with 50 exercises (and another 150 bonus exercises) to push your Python skills forward, helping you not just to solve the problem at hand but to generally understand how the language works.

Python Workout, along with two other books (“Tiny Python Projects” and “Data Science Bookcamp”) is currently 50% off, as a Manning “Deal of the day.” No matter what you’re doing with Python, you’ll likely benefit from or more of these books. Just go to and enter the code dotd100620 at checkout to get half off.

But don’t wait — this deal is only good on October 6, 2020!

“Python Workout” is Manning’s “Deal of the Day”!

If you’ve been looking for a way to become more fluent in Python, then there’s no better way than practice. And my book, Python Workout, is full of such exercises, helping you to really understand how and when to use lots of Python techniques.

Sounds good? Well, it can get better: Python Workout is today’s “Deal of the Day” from Manning. Just go to and you’ll get 50% off Python Workout (as well as “Data Science Bootcamp” and “Deep Learning with Structured Data”). Or enter the coupon code dotd091520 at checkout to claim your discount.

But don’t delay; this deal (as you can imagine) is only good today — Tuesday, September 15th, 2020!

This Sunday, start writing better Python code

Want to write better, more readable, more flexible, and more maintainable Python code?

Well, testing is the key to that, and pytest is the key to testing in Python.

This is just a quick reminder that my pytest course will be given live on this coming Sunday, September 13th.

This course is for you if:

  • You want to write more robust Python code via testing
  • You want to understand how to use pytest
  • You want to understand some of pytest‘s more sophisticated features, such as parametrized tests and fixtures

Learn more about my pytest course

Because it’s a live class, there will be plenty of opportunity for questions and answers. And of course, there will be lots of exercises as well, so that you can practice what you’ve learned.

Questions? Just contact me at I’ll be happy to answer. Or check out the course page at, which has a FAQ.

Master object-oriented Python with Weekly Python Exercise — starting September 8th

Object-oriented programming has been around for several decades. As a result, it has become easier to organize, maintain, and reuse code.

Well, sort of. Perhaps the word “easier” isn’t quite right.

I’ve met many people who tried to learn programming, and especially object-oriented programming, in such languages as C++, Java, and C#, and got lost with all of the syntax and terminology.

The good news is that Python’s objects are much more straightforward to learn and use than those other languages. But there are still concepts to master, as well as syntax and keywords associated with objects. And even after you’ve learned how to work with classes, instances, and methods in Python… it can still be a bit daunting and unfamiliar.

Does that describe you? Are you somewhat familiar with Python’s objects, but not fluent enough to use them confidently in your own projects? If so, then you’re not alone. Moreover, there’s a good way to become more fluent, and to gain confidence when working with Python’s objects: Practice. And not just practice, but guided practice, ideally with peers learning alongside you.

If this does describe you, then you should check out the upcoming cohort of Weekly Python Exercise, which will concentrate on object-oriented programming for beginners. For 15 weeks, you’ll get a new problem on each Tuesday, and see the solution on the following Monday. You’ll participate in our exclusive online forum, exchanging ideas and solutions with other students. And you’ll be invited to live, monthly office hours at which we can discuss any Python topics you want.

Join Weekly Python Exercise A3: Objects for beginners

But don’t delay: WPE A3 (“Objects for beginners”) starts on Tuesday, September 8th, and won’t be offered until the autumn of 2021. Register, or just learn more, at Or if you have questions, contact me at or on Twitter as @reuvenmlerner.

New course: Testing your Python programs with pytest

My first job was at a company that wrote software for hospitals. As you can imagine, our work needed to be really reliable — so we had an entire team dedicated to quality assurance (QA). Their job was to run our software for months at a time, given many different inputs, and to make sure that it didn’t cause trouble.  I can tell you that the head of QA was the most feared person in my department. And yet, we all knew that his job was of utmost importance. If it weren’t for him, buggy software could go out the door, with catastrophic effects for people being treated in hospitals around the world.

More than 25 years have passed since I had that job. And while not every program directly affects people’s lives,  there’s no doubt that software is hugely influential. Buggy programs can not only hurt people, but lose money, destroy documents, give incorrect projections, and use up valuable resources.

It’s no surprise, then, that testing continues to be really important. And while there are lots of  people still working in QA, much of that burden is now shouldered by individual developers, who have to test the code that they wrote themselves.  That’s right — you can test your own code, to make sure it does what it’s supposed to do (and  doesn’t do what it’s not supposed to do).

Over the last few years, I’ve joined a large and growing number of Python developers using pytest — a test system written in Python, designed to be used by Python developers. And I have to say, pytest is truly amazing: It’s easy to learn, very powerful, and has a huge community that contributes a wide variety of plugins for everyone to use.

Earlier this month, I asked subscribers to my “Better developers” list what topics they would like to learn in a series of live courses I’m starting to offer. And overwhelmingly, people wanted to learn pytest.

I’m thus delighted to announce that on Sunday, September 13th, I’ll be teaching a live, four-hour online course about pytest: “Test your Python code with pytest” If you’ve always wanted to learn about testing in general, or pytest in particular, this course will jump-start you into understanding the hows (and whys) of testing your Python code. 

Click here to join my “pytest” course

A few quick points:

  • The course will take place at 6 p.m. in Israel (where I live), which is 4 p.m. in London, 11 a.m. Eastern, and 8 a.m. Pacific. I hope that you’ll be able to join me live, so that you can participate and ask questions.
  • Even if you can’t join me live, the recording will be available to everyone who has enrolled. And that recording will be available forever — if you don’t have a chance to watch it right away, or want to review the material later on.
  • The course is 4 hours long, but will include a good number of hands-on exercises.

You’ll walk out of this course knowing how to use pytest, and how to apply that knowledge to your own programs — making them more robust, and saving you time down the road.

I’m really excited about pytest, and also excited to offer courses in this new format.  Please join me, and learn how to write better, more reliable code in less time.

For more info, and to register, go to Any questions? Just contact me at or on Twitter as @reuvenmlerner.

TinyMBA — A quick read full of profound strategic ideas

I’ve been in business since 1995. And I’ve made a lot of mistakes along the way. When I speak with other people who have been in business, I find that I’m not alone; we’ve all make a lot of mistakes along the way.

It’s not because I didn’t seek out advice. Heck, I asked for advice from everyone I knew, and sometimes that advice was really useful. Other times, the advice was … well, let’s just say that it was less than useful. For example, when I was just starting up, someone told me to never say “no,” no matter what a client was asking me to do. This was probably the worst advice I have ever gotten, but it took many years to realize just how profoundly wrong it was.

Some of the advice I got was excellent, but tactical: Here’s how to submit a proposal. Here’s how you should approach a meeting. Here’s how to invoice your clients. All of this was interesting and useful, but it wasn’t enough.

What really changed my business, and my life, for the better was strategic advice. Such advice doesn’t pay off right away, but it does pay off over the long term — and I’m living proof of it. Strategic thinking means considering what you do, what sorts of clients you want to attract, and how you present yourself to them. It means thinking about the types of products and services that you can offer, making sure that they align with market needs, and then making sure that potential clients find you are are delighted to pay you to service those needs.

It’s still somewhat humbling and amazing to find myself e-mailing with the training managers at Fortune 100 companies, filling my schedule with courses many months in advance. But I credit it all to a change in my strategic thinking.

Alex Hillman is well known not just for his own successful businesses, but for helping many other people to create and sustain successful businesses. In his new e-book, “The Tiny MBA,” Hillman gives you tons of useful strategic advice for building your business. Each of these nuggets of wisdom is written in one or two sentences, making the book a very quick read.

Anyone who knows about Hillman and his products won’t be surprised to hear that he tells you to look for customers rather than investors, that the feast/famine cycle an indication of problems in your business, rather than inevitable, and that you should look in the mirror when trying to figure out why all of your clients are cheapskates and difficult to deal with. At the end of the book, he gives advice that is counter to everything we hear from Silicon Valley and investors: It’s OK to own and run a profitable business for a long time. You don’t need to sell. You don’t need to go public. It’s not a shame to do this — on the contrary, it’s something to enjoy and be proud of.

He says things that seem so obvious to me now, at the age of 50 and after having run a business for a while, which I would have thought were bonkers way-back-when. For example, I’m a programmer, and have thus come to believe that the more I can automate my business, the better. And indeed, I have automated many processes in my business, and I’ve benefited as a result. But when you’re releasing a new product, or you’re trying something new, it’s just not worth investing the time to automate everything. First do things manually, a process that he calls “Flintstoning,” referencing an article by his business partner (and powerhouse writer) Amy Hoy.

And his pricing advice? Completely spot on. Pricing products and services based on your personal budget and willingness to spend is as foolish as it is common. As he writes, “Odds are that you will underprice yourself because you set prices based on what you would pay, not what they already spend.” As someone who provides corporate training services, I know that what I charge is par for the course at big companies — but far beyond what most individuals would spend.

But of course, there’s a reason for that. As Hillman writes later on, “They aren’t buying your time so much as they are buying back their own time, which again, they perceive as finite and valuable.” When people hire me to teach Python to their engineers, they’re not hiring me by the hour. Rather, they’re making their engineers more efficient — something that is very much worth a five-figure investment.

Just about everything I read in the book seems obvious to me now, but was far from obvious to me years ago. If you’re starting a business, then you would be wise to follow this advice, or at least have a plan in place to follow it — and the sooner, the better. In many cases, Hillman points you to articles and references that explain topics in greater detail; I would have liked to see more of these, but perhaps the point of “The Tiny MBA” was to distill things down to the minimum, not to give you a semester-long reading list. That said, a longer list of articles and resources would have been welcome.

My biggest concern about this book is that the people who need to read it — people in the early stages of running their own business — will not appreciate the truth or depth of the short statements Hillman makes on every page of the book. They’ll second guess what he writes, or will think that these ideas are applicable only to someone who is already successful, not to someone who is only starting out. It’s also so easy to get sucked into the seemingly glamorous world of VCs, startups, and “growth hacking,” when it’s both satisfying and profitable to have a small business that makes money by doing things that help others.

The Tiny MBA” is indeed short, but its message and ideas pack a wallop. Read it, enjoy it, and take its advice to heart. And if you’re only starting your business, know that many of us took years to figure out the truth in what Hillman writes here.