In this step-by-step Python tutorial, you'll learn how to take your command-line Python scripts to the next level by adding a convenient command-line interface (CLI) that you can write with the argparse module from the standard library.
In this tutorial, you'll learn all about working with YAML in Python. By the end of it, you'll know about the available libraries, their strengths and weaknesses, and the advanced and potentially dangerous features of YAML. You'll also serialize ...
In this tutorial, you'll look at what Python decorators are and how you define and use them. Decorators can make your code more readable and reusable. Come take a look at how decorators work under the hood and practice writing your own decorators.
In this tutorial, you'll get the lowdown on sorting Python dictionaries. By the end, you'll be able to sort by key, value, or even nested attributes. But you won't stop there---you'll go on to measure the performance of variations when sorting and .. ...
In this tutorial, you'll learn about assignment expressions and the walrus operator. The biggest change back in Python 3.8 was the inclusion of the :=operator, which you can use to assign variables in the middle of expressions. You'll see several ...
In this tutorial, you'll learn how to write set comprehensions in Python. You'll also explore the most common use cases for set comprehensions and learn about some bad practices that you should avoid when using them in your code.
This month brings exciting updates, including improvements to template strings in PEP 750 and the release of Python 3.14.0a2. There are new features to explore in many third-party libraries, such as Pydantic. Also, PyCon's call for proposals deadline ...
A Python script or program is a file containing executable Python code. Being able to run Python scripts and code is probably the most important skill that you need as a Python developer. By running your code, you'll know if it works as planned.
In this step-by-step tutorial, you'll learn how to use Python timer functions to monitor how quickly your programs are running. You'll use classes, context managers, and decorators to measure your program's running time. You'll also learn the ...
In this tutorial, you'll learn how to integrate Celery and Django using Redis as a message broker. You'll refactor the synchronous email sending functionality of an existing Django app into an asynchronous task that you'll run with Celery instead.