这可能像一个sil然的问题,但我试图找到一个没有多大成功的解决办法。 我收到一份名单:
for v in sorted(list):
print v
[885.1, 12824]
[885.1, 19843]
[885.11, 1319]
[885.12, 1155]
[885.13, 12844]
[885.14, 33602]
[885.15, 11324]
[885.16, 44040]
[885.2, 119283]
[885.3, 8424]
我通过我的清单,利用分类的功能——然而,如上所述,将ASCII中的项目归类为人类可读顺序的浮动? 即:
[885.1, 19843]
[885.2, 119283]
[885.3, 8424]
[885.11, 1319]
[885.12, 1155]
[885.13, 12844]
[885.14, 33602]
[885.15, 11324]
[885.16, 44040]
Do I need to create an index of somekind? Convert my floats to ints? Any help much appreciated.
David。