Stop Using Print: A Beginner’s Guide to Python Logging
When your code breaks, your first instinct is probably to add print("HERE!") or print(variable) to see what’s happening. This Python Logging Guide will help you…

When your code breaks, your first instinct is probably to add print("HERE!") or print(variable) to see what’s happening. This Python Logging Guide will help you…

Sometimes you need a tiny function for just one quick task. Python Lambda Functions are perfect for these occasions. Writing a full def my_function(): block…

You’ve seen them before. In Flask, you use @app.route("/"). In Django, you might see @login_required. These are Decorators, and understanding Python decorators can significantly enhance…

Imagine your Web Scraper finds a great deal. Wouldn’t it be nice if it emailed you immediately? With the right know-how, you can send emails…

In our Guide to OOP, we created a Dog class. But what if we also need a Cat class? They both have names and ages….

This is one of Python’s trickiest errors, known as UnboundLocalError. It happens because of how Python handles Variable Scope (where variables can be seen). ⚡…

Imagine you need to process 1 billion numbers. If you create a List of 1 billion numbers, Python has to create all of them at…

If you have been writing Python for more than a few days, you have likely written this exact sequence of boilerplate code: While this works…

You’ve learned functions, loops, and variables. You can write scripts. But to build large applications (like with Django), you need a better way to organise…

You’ve seen plenty of errors by now: ValueError, TypeError, ZeroDivisionError. In Python, Try Except can be used to handle these errors gracefully. Normally, when these…