假设我有一个数字列表:
some_numbers = [16.0, 16.01, 24.53, 22.99, 22.72, 22.71, 22.2, 21.36, 21.34,
21.0, 22.67, 22.62, 15.89, 23.54, 27.0, 21.35, 26.99, 25.46, 22.54, 22.53,
17.99, 22.13, 17.97, 17.96, 17.95, 22.4, 22.32, 22.25, 22.19, 22.16,
20.68, 21.74, 15.38, 11.13, 15.82, 22.33, 22.31, 22.23, 22.15, 22.12,
22.11, 22.07, 18.99, 18.94, 18.86, 18.85, 18.82, 18.81, 16.79, 15.98,
15.96, 15.94, 15.9, 15.86, 15.85, 15.83, 11.47, 11.46, 11.36, 11.34,
11.32, 11.28, 11.26, 11.25, 11.21, 11.19, 11.18, 9.99]
但是列表包含的数据有点太多,我想传达传播。我想打印这些数字中的 10 个。1 是最高数字,10 是最低数字,我如何对列表进行排序并打印 10 个数字的范围来表示从最高到最低的点差?
假设列表是[1,2,3,4,5,6,7,8,9,10,11,12,13],我想要在该范围内分布四个数字,分布将为[1,5,9,13].
烙印99
慕森卡
相关分类