A Guide to the Newer Python String Format Techniques

In the last tutorial in this series, you learned how to format string data using the string modulo operator. In this tutorial, you’ll see two more items to add to your Python string formatting toolkit. You’ll learn about Python’s string format method and… Read more

Similar

Atomic lock-free counters in Python

At Datadog, we're really into metrics. We love them, we store them, but we also generate them. To do that, you need to juggle with integers that are incremented, also known as counters. While having an integer that changes its value sounds dull, it might ... (more…)

Read more »

Python context managers

The primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today!

Read more »