Python Is Easy Until a Challenge Humbles You
Mike Tyson famously said, “Everybody has a plan until they get punched in the face.” When it comes to learning Python or any programming language, you could say, “Everybody thinks they understand a topic until a challenge is thrown at them.”
When I started learning Python, there were certain topics I thought I understood. The theory behind them seemed straightforward, even easy. But the moment I tackled real challenges, I experienced my own “punch in the face” moment. I realized that my theoretical knowledge wasn’t enough. That feeling of inadequacy came not only from gaps in my understanding but also from the fact that I had been consuming information passively. It’s like eating food without chewing. Knowledge only becomes useful when you actively engage with it.
To really grasp a concept, you need to put yourself in situations that force you to apply that knowledge to solve problems. For instance, it’s one thing to learn about lists and their properties; it’s a completely different thing to figure out how to move items around in a list. Applying critical thinking to challenges is what leads to a true, deeper understanding of a topic.
It was from my own learning experience that I wrote 50 Days of Python: A Challenge a Day (March 2022). The idea behind the book is to encourage Python learners to incorporate challenges into their learning journey. After reading a book or watching a tutorial, it’s crucial to immediately dive into problem-solving. There’s no better way to learn than by tackling real challenges.
The book covers a wide range of Python topics, from basics to intermediate levels, with over 80 challenges to test your knowledge and skills. If you’re starting out with Python, these challenges can be an excellent way to build a strong foundation. In this article, I’ll share four challenges from the book that I think you should try.
1. Sort By Last Name
This is a challenge that requires that you apply your knowledge on how to manipulate a list of strings. In this challenge you are required to sort a list of names by their last names. Here is the question below:
The interesting part about this question is that it requires sorting the list by last name rather than the default alphabetical order. This means that to get it done, you may need a custom sort function or a lambda expression. You will need to know how to create a custom key for sorting, which is a common requirement in real-world applications where data often needs to be sorted based on specific attributes rather than a default order.
The output requires that you switch the format of the names. Switching the format of names (from “First Last” to “Last First”) emphasizes the importance of data presentation and how data formatting can influence readability and usability. This is an important aspect of data processing, especially in applications like reporting, data analysis, and user interfaces, where the way data is displayed can matter as much as the data itself. This is a great challenge.
2. Move Zeros to the End
This challenge requires that you move items in a list. basically moving zeros (if they are in the list) to the end of the list. Here is the challenge below:
This is an extra challenge in the book. The requirement to move zeros while preserving the original order of other elements requires you to think about how to separate and combine lists efficiently. This can be achieved through list comprehensions, filters, or loops, and it encourages learners to find creative, efficient ways to implement sorting and separation.
Similar problems are common in real-world data handling tasks, where it’s necessary to separate and prioritize certain values. Examples include data cleaning and reordering, where specific placeholders (e.g., zeros or null values) need to be handled differently from other data points.
3. Password Generator
Think about it: password generators are part of the internet now. Most websites generate a password for a user. This challenge tests your ability to set up a password generator that meets three different conditions. That sounds like a good question to practice conditional statements on. Here is the question below:
This challenge will help you reinforce your knowledge of string handling and how to build custom data strings with specific character requirements. Generating a random password with a mix of characters requires using libraries like random. These libraries provide functions to generate random numbers, select random characters, and shuffle sequences, all of which are crucial for creating secure passwords. Understanding how to use these libraries is a key aspect of how to randomize data in Python.
4. Sort By Length
What is great about this challenge is that it reinforces fundamental concepts in algorithm design, sorting, and list manipulation. Here is the challenge:
Since the challenge restricts you from using Python’s built-in sort() or sorted() functions, you are encouraged to implement your own sorting logic. This offers a practical introduction to basic sorting algorithms (e.g., bubble sort or insertion sort). By solving this challenge, you will understand the inner workings of sorting rather than relying on built-in functions.
Sorting by length is different from sorting alphabetically, so you must learn how to handle a custom sorting criterion (string length). This builds an understanding of how to customize sorting based on specific attributes, which is important when dealing with complex data in real-world scenarios where sorting might be based on multiple or unique criteria. Another great challenge
Wrap-Up
I know some of you are experiencing that “punch-in-the-face” moment right now with these challenges. Do not feel bad. You have to experience such moments to grow. It is moments like these that make you realize that learning Python requires more than just reading syntax rules or memorizing functions; it takes hands-on practice and problem-solving to truly understand the language’s nuances and capabilities. Challenges like the ones we’ve discussed are designed to push you beyond theoretical knowledge and into practical application, where critical thinking and creativity come into play. As you tackle these exercises, you develop a strong foundation that makes you a better programmer, problem solver, and ultimately, a more versatile Python developer. Thanks for reading.
Experience Your Punch-in-the-Face Moment
Move challenges waiting for you in 50 Days of Python: A Challenge a Day
Other Resources
Master Data Analysis with Python: 50 Days of Data Analysis with Python: The Ultimate Challenge Book for Beginners
Want to learn Python fundamentals the easy way? Check out Master Python Fundamentals: The Ultimate Python Course for Beginners
Learn SQL hands-on. Check out SQL Essentials for Data Analysis: A 50-Day Hands-on Challenge Book (Go From Beginner to Pro).
100 Python Tips and Tricks, Python Tips and Tricks: A Collection of 100 Basic & Intermediate Tips & Tricks.







Yes, Python easy English like syntaxes trick learners to believe that Python is an easy Programming language, but, not true when it comes to solving problems. JavaScript is actually easier to solve problems once one gets the syntax right.