Python *args and **kwargs: How to Write Flexible Functions
Sometimes you don’t know how many arguments a user might pass to your function, which is why understanding Python args and kwargs is essential. Think…
Your complete guide to learning Python in 2026. Go from zero to your first app with step-by-step tutorials on syntax, projects, and career paths.

Sometimes you don’t know how many arguments a user might pass to your function, which is why understanding Python args and kwargs is essential. Think…

In our Basic Decorator Guide, we built a simple @log_decorator. But what if we want to configure the decorator itself? Like this: @repeat(times=5). Now it’s…

Have you ever broken your code and wished you could just hit “Undo” to go back to yesterday’s version? Or perhaps you accidentally deleted a…

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…

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….

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…