Finding a good programming resource is like looking for a needle in a haystack. It’s hard to find and can take a lot of time.
I’ve used several Python resources recently that are worth knowing about. Some are free, others are not. But all are excellent.
If you’re learning-or looking to get better at-Python, then this post is for you. In it, I share the best Python resources I’ve used so far in 2020.
I’ve used several of Reuven Lerner’s Python products. Each one has been excellent. There are two you need to know about.
First, Ace Python Interviews. This free course contains 50 instructional videos on Python topics organized into three levels: beginner, intermediate, and advanced.
Each video focuses on a question that Lerner addresses in a screencast. Here are some examples:
- How do you swap variables?
- What’s the difference between .py vs .pyc files?
- What’s an UnboundLocalError?
The screencasts are usually only five to ten minutes long, but they’re packed full of information. Even if you’re familiar with a topic, you’ll likely learn something new.
That’s because Lerner goes well beyond the surface level of how something works and gets into the nuances of a concept or topic. You’ll find out when and why you’d use ‘break’ instead of ‘continue,’ for example. You’ll learn how ‘else’ works in a Python loop and when (and when not) to use it.
His explanations are supported by live code examples. You’ll see him write functions, classes, or conditionals to explain each concept.
This is hugely beneficial: you get into the mindset of a great programmer.
Ace Python Interviews is a no-brainer for anyone who’s looking to enhance their Python knowledge.
Lerner’s recent book, Python Workout, is another fantastic source.
It’s filled with 50 problems that dive into core parts of the language: strings, dictionaries, functions, files, lists and tuples, among others.
This book is practice-heavy, which is why I like it so much. After a brief introduction to a topic, Lerner gives you a problem to solve.
Where Lerner excels the most is in the thoughtful solution he provides. He not only provides the answer, but also a detailed explanation. It’s a point of distinction.
He seems to realize that getting the answer is only part of the process.
It’s also about learning from the problem: breaking it down, using the right tools to solve it, and understanding each step. Lerner walks you through his thought process from start to finish and explains key points along the way.
As a result, your Python language context will grow (mine sure has), since Lerner’s solutions will likely expose you to new features of Python or different ways to do things. Your problem-solving skills will also become more refined.
It’s great to build your library of knowledge. But you constantly have to put your knowledge to practice.
Even if a resource has practice problems or exercises, it’s a good idea to test yourself with additional ones.
Here are a few resources to get more practice.
Brian Hogan’s book, Exercises for Programmers
Hogan provides practical problems that are organized mostly by concept, such as files, data structures, and functions.
You can solve the same problem over and over again and gain new insights each time. That’s because he offers several challenges and a constraint for each problem. In short, his problems have many layers to be discovered.
This programming platform offers a variety of problems that range in difficulty. What I like best is its focus on tests: there is a file of tests for each problem. Solving problems on Exercism was my start with Test-Driven Development.
I’m enrolled in Interview Cake’s “full course,” where I’m learning about and getting practice with algorithms, data structures, and big O notation. The problems are well-selected to help you understand a concept or topic, like stacks.
Once you’ve solved a problem, it’ll break it down step-by-step. Indeed, the focus is on the process. You’ll come away with a great understand why a certain approach makes sense in a given context.
There’s no shortage of problems to solve on LeetCode. But it offers an important benefit.
There are usually multiple solutions with detailed explanations for each problem you solve. As a result, you’ll get better at reading code, considering time and space complexity, and thinking about many ways to tackle the same problem.
There’s a commonality among many of the sources listed in this article. They not only offer a solution, but a thorough explanation.
When I first began to program, many of the resources I used didn’t provide the solution let alone an explanation. On the one hand, there’s value to that: you’re forced to deal with ambiguity and you can grow a lot from the struggle. In fact, Lerner’s book, Python Workout, also contains problems without solutions.
But I now realize why it’s important to also incorporate resources that do offer solutions with explanations. It’s incredibly useful for learning purposes. In fact, it points to the last step in George Pólya’s mathematical problem-solving process, which is “looking back.”
“By looking back at the completed solution, by reconsidering and reexamining the result and the path that led to it, [students] could consolidate their knowledge and develop their ability to solve problems,” writes Pólya in his book, How to Solve It.
“Looking back” is something we ought to do individually as programmers. This process is enhanced, however, when we consider and study solutions of others and the process that got them there.
Finding a good programming resource can be hard to come by. So keep the resources mentioned in this post handy. Because when you’re pressed to learn something it’s helpful to have a few resources at your ready.