From 6941e5244438eb5747a6b1a5b023f5f79c76e12f Mon Sep 17 00:00:00 2001 From: Alexander R <140752247+AlexxRussell@users.noreply.github.com> Date: Wed, 18 Nov 2026 20:30:10 +0200 Subject: [PATCH] Update the NaN example output in the statistics docs --- Doc/library/statistics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index 9ff30211ebcf15..4743dcd57887d4 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -47,9 +47,9 @@ functions:: >>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior - [20.7, nan, 14.4, 18.3, 19.2, nan] + [18.3, nan, 14.4, 20.7, nan, 19.2] >>> median(data) # This result is unexpected - 16.35 + 17.55 >>> sum(map(isnan, data)) # Number of missing values 2