Is Weekly Python Exercise for you?

In just a few days, I’ll be starting a new cohort of Weekly Python Exercise A1: Data structures for beginners. From my experience teaching Python for 20 years, I’d say that this is one of the best ways out there to improve your Python fluency. That’s because it combines actual practice, automated “pytest” tests, and community interactions.

But don’t believe me! Here’s what previous participants have said:

  • 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. During WPE, there were many examples, with a wide variety 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.

So, WPE was right for them.  But is it right for you

  • If you have been using Python for less than one year, then WPE A1 will help you to understand how and when to use core data structures.
  • If you haven’t quite grasped when to use lists vs. tuples vs. dicts vs. sets, then WPE A1 will make this clearer.
  • If you feel like you’ll never remember or understand the many methods on core data structures, then WPE A1 will help you to understand and remember.
  • If you’re tired of going to Stack Overflow and Google multiple times each day, then WPE A1 will help.

But don’t take my word for it: You can sample WPE, taking you through two questions and answers to show you how it works.

Moreover: I’m running a free Webinar on Monday, and will be happy to answer your questions about Weekly Python Exercise, and how it works.  It’ll take place on Monday, at 17:00 Israel time; to convert it to your time zone, click here:

https://www.timeanddate.com/worldclock/fixedtime.html?msg=WPE+webinar&iso=20200113T17&p1=110&ah=1

You’ll then be able to join me at the Webinar via the following link:

https://zoom.us/j/193166387

There are six different WPE classes; this is one of three beginner-level classes I’ll be running in 2020. But it’s the only time I’ll be running A1 — data structures for beginners. So if you want to improve your understanding of data structures, including how and when to use them, this is your chance!

Join WPE A1: Data structures for beginners

Remember: I offer discounts for students, seniors/retirees/pensioners, and anyone living outside of the world’s 30 richest countries. E-mail me at reuven@lerner.co.il if you qualify, and I’ll send you a coupon code.

1

Looking back at 2019, looking forward to 2020

Hi, and welcome to 2020! The last year (2019) was quite a whirlwind for me and my work — and I thus wanted to take a few minutes to summarize what I’ve done over the past year. But the coming year looks like it’ll be just as exciting, if not more so, and I wanted to fill you in on what you can expect.

Let me start off by saying that I’m extremely grateful to have the opportunity to teach Python to so many people around the world, both in person and online. Thanks so much for your interest in my writing and work, and (for so many of you) for taking the time to e-mail me with corrections and suggestions. It means a lot to me.

Summary of 2019

  • On-site training: I traveled quite a bit in 2019, teaching in-person courses at companies in the US, Europe, India, and China. (And of course, I’m teaching quite a bit in Israel, where I live.) 
  • Conferences: I attended PyCon in Cleveland, Ohio, where I also gave a talk on “Practical Decorators” and sponsored a booth, where I gave away more than 800 “Weekly Python Exercise” T-shirts.  I also attended Euro Python in Basel, Switzerland, where I gave my “Practical Decorators” talk a second time, and met lots of great Python developers.
  • Local talks: I gave talks to local Python user groups in Beijing, China and Hyderabad, India.  I also met some some subscribers to my “Better developers” list in San Jose, California when I was there!
  • Online courses: I released three new paid courses in 2019:  Intro Python Functions, NumPy, and Pandas.  All three courses include many exercises, as well as video lectures.
  • Weekly Python Exercise: There are now six distinct versions of Weekly Python Exercise, three for beginners, and three for intermediate/advanced Python developers.  Each cohort has been larger than the previous one.
  • Book: My book, “Python Workout,” was released in early edition (MEAP) format by Manning, and is slated to be complete within the next two months. It includes 50 Python exercises to improve your fluency, as well as a lot of background material, additional exercises, and insights that I’ve gained in teaching over the years. I have been very impressed with Manning and all they’ve done to make the book far better than I could have done on my own.
  • Free online course: I also released a new, free online course, aimed at helping people who are interviewing for Python programming positions, called “Ace Python Interviews.” So far, the response has been overwhelming; I hope to get this course out to as many people as possible, to help them get the Python job of their dreams.
  • YouTube: I started a series of videos, walking through the Python standard library.  I had to pause that series in order to do a few other projects, but hope to get back to it within the coming weeks, and thus explain more about the standard library to the world. Subscribe to my YouTube channel to get regular updates!
  • Twitter: I recently started tweeting interesting questions that I get in my courses, along with their answers.  I hope to keep doing this a few times a week, to give short insights about Python based on real-world questions and problems.  Follow me on Twitter to get the latest!
  • Blogging: I wrote a number of Python-related articles on my blog this year, including one about the search path for attributes in Python, which I call ICPO — instance, class, parents, and object. 
  • Trainer Weekly: I continue to write my newsletter for trainers, about training.  If you’re interested in the business, logistics, and pedagogy of the training industry, then feel free to sign up!
  • Better developers: My free, weekly list about Python has grown to more than 14,000 subscribers from around the world, up from about 8,000 subscribers on January 1st of 2019. You can subscribe here: https://lerner.co.il/newsletter.
  • Podcast hosting: After several years of co-hosting the Freelancers Show podcast, I left, along with my co-panelists.  We’ll almost certainly be starting a new podcast in the near future to help people with their freelancing/consulting issues.
  • Podcast appearances: I appeared on a whole bunch of podcasts in 2019, including Talk Python (twice), Test & Code, Teaching Python, and Profitable Python.  I also appeared on the “You Can Learn Chinese” podcast, where I talked about my journey learning to speak, read, and write Chinese. 

What’s planned for 2020

  • On-site training: I’m already booked solid through March of this year, and partly through September. I already expect to return to the US, UK, India, and China, and will try to announce it when I’m in town, to meet up with subscribers.  If you want to book me for in-person training at your company, please reply to this message — we can chat about your needs!  You can even book time to speak with me via this link: https://calendly.com/reuvenlerner/corporate-training-needs
  • New courses: I’m adding two new courses to my existing list. First, I have a new one-day course in “pytest” testing, which I’m very excited to start offering. I’ve also decided to go back to my roots in Web development, and I’m developing a new course in creating Web applications using Flask. The first course is already being taught, and the second will be ready by the spring. 
  • Conferences: I’ll once be sponsoring a booth at PyCon 2020, which will take place this year in Pittsburgh, PA. (And yes, I’ll again be giving out T-shirts!)  If you plan to be at PyCon, please let me know; I’d love to meet you in person.  (I’ve applied to speak, and hope that I’ll manage to get a slot there, as well.)  I am also planning to attend Euro Python in Dublin, Ireland toward the end of July.  I’m open to attending other conferences; if you are running a conference and would like to have me speak there, please drop me a line.
  • Online courses: I’m planning to release 3-5 new courses during 2020. At this point, I’m going to divide things up between introductory and advanced courses. The beginner courses will likely be about working with files and modules, while the advanced courses will likely be about iterators/generators, decorators, and advanced object-oriented programming.
  • Weekly Python Exercise: All six existing WPE cohorts are already scheduled for 2020, with WPE A1: Data structures for beginners starting on January 14th.
  • New Weekly Python Exercise courses: I’m planning to start new cohorts of WPE on specific topics, such as Web development, design patterns, and data science. These will follow the same WPE format, but be on particular topics.  I’m hoping to start at least 1-2 of these by the summer.
  • Certification: A number of people have asked me about certification for my courses. I have some ideas for how I’ll do that, and I’m going to try some experiments with WPE cohorts early this year to see how it goes. I realize that getting a certificate at the conclusion of a course is worth quite a bit, and want to help people to that end.
  • More “workout” books: I’m already speaking with Manning about producing additional “workout” books.  I hope to start on at least one by the end of 2020, and to have a MEAP available for people to start looking, tinkering, and responding.
  • Podcast: As I mentioned above, my former “Freelancers Show” panelists and I are looking to start a new podcast about freelancing in the near future. I’ll announce more details here.  I’m also toying with the idea of starting a Python-related podcast — if you have thoughts about this, please let me know!
  • China: I’m setting up a new company in China to distribute my online courses there, with Chinese subtitles and mobile payment support (aka AliPay and WeChat wallet). I hope to have more details in the coming months, but if you’re based in China and have insights into what people might want, I would be happy to hear from you.  (For now, my Chinese isn’t nearly good enough to teach in the language, so the lectures will continue to be in English.)
  • PySpa training: Earlier this year, my family and I took a vacation to Rhodes, a Greek island in the Mediterranean. It was October, but still more than nice enough to go in the water and enjoy the weather. I’m thinking of offering one or more of my 4-day Python courses at a similar venue, with intensive training during the day — and free time for swimming, eating, and touring at night.  If this sounds interesting to you, then please tell me what you think!

I hope that you also have some big plans for 2020. Best of luck with them, and I hope to see you at one or more of my courses and visits during the coming year.

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 reuven@lerner.co.il, 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 reuven@lerner.co.il, or on Twitter as @reuvenmlerner .

1

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!

4

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)
123123

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)
246

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))
17

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)
246

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')
5
>>> int('   5    ')
5
>>> int('\n\n\t\t  5\t\t\v\v\t\t\n\r')
5

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.

>