Open this example in the interactive library
Source code
from statistics import pstdev
print(round(pstdev([2, 4, 4, 4, 5, 5, 7, 9]), 2))Sample output
2.0

Measure population deviation. A self-contained example using the Python standard library.
Open this example in the interactive library
from statistics import pstdev
print(round(pstdev([2, 4, 4, 4, 5, 5, 7, 9]), 2))2.0