6.3 Debugging with f”{value=}” strings
One of the most important debugging and design tools available in Python is the print() function. The two formatting options shown in the Using the features of the print() function recipe don’t offer a lot of flexibility. We have more flexibility with f"string" formatting. We’ll build on some of the recipes shown in Chapter 1, Numbers, Strings, and Tuples.
6.3.1 Getting ready
Let’s look at a multi-step process that involves some moderately complex calculations. We’ll compute the mean and standard deviation of some sample data. Given these values, we’ll locate all items that are more than one standard deviation above the mean:
>>> import statistics
>>> size = [2353, 2889, 2195, 3094,
... 725, 1099, 690, 1207, 926,
... 758, 615, 521, 1320...