本文介绍了关于max()和min()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这样的情况:

>>> li = [''926.7'',''930.6'',''931.7'',''933'',''934.1'',''936.5'',''937.5'',''940.5'' ,''941.6'',''944.6'',''945.7'',''947.2'',''948.6'',''950.4'',''953.4'',''957'',' '958.6'',''962.1'',''966.5'',''968.2'',''969.7'',''970.4'',''973.1'',''974.6'',''975.3 '',''983.9'',''989.8'',''996.5'',''999.3'',''1001.8'','''1006.1'',''1010.5'',''1011.9'' ,''1012.6'',''1013.9'',''1023.8'',''1034.3'',''1035.3'',''1035.9'',''1038.4'',''1044.3'',' '1045.8'',''1046.8'',''1055.2'','''1057.5'',''1063.2'',''1065'','''1069.5'',''1070.8'',''1080 '',''1085'',''1087.1' ','''1101.1'',''1102'',''1102.7'',''1115.7'',''1125.1'',''1136.6'']

>> > li

[''926.7'',''930.6'',''931.7'',''933'',''934.1'',''936.5'',''937.5' ',''940.5'',''941.6'',''944.6'',''945.7'',''947.2'',''948.6'',''950.4'',''953.4'', ''957'',''958.6'',''962.1'',''966.5'',''968.2'',''969.7'',''970.4'',''973.1'','' 974.6'',''975.3'',''983.9'',''989.8'',''996.5'',''999.3'','''1001.8'',''1006.1'',''1010.5' ',''1011.9'',''1012.6'',''1013.9'',''1023.8'',''1034.3'',''1035.3'',''1035.9'',''1038.4'', ''1044.3'',''1045.8'',''1046.8'',''1055.2'',''1057.5'',''1063.2'',''1065'',''1069.5'','' 1070.8'',''1080'',''1085'',' 1087.1'',''1101.1'',''1102'',''1102.7'',''1115.7'',''1125.1'',''1136.6'']

> >> max(li)

''990.3''

>>> min(li)

''1001.8''

>>>


我不知道为什么。

有人能回答我吗?

I met a situation like this:
>>> li=[''926.7'', ''930.6'', ''931.7'', ''933'', ''934.1'', ''936.5'', ''937.5'', ''940.5'', ''941.6'', ''944.6'', ''945.7'', ''947.2'', ''948.6'', ''950.4'', ''953.4'', ''957'', ''958.6'', ''962.1'', ''966.5'', ''968.2'', ''969.7'', ''970.4'', ''973.1'', ''974.6'', ''975.3'', ''983.9'', ''989.8'', ''996.5'', ''999.3'', ''1001.8'', ''1006.1'', ''1010.5'', ''1011.9'', ''1012.6'', ''1013.9'', ''1023.8'', ''1034.3'', ''1035.3'', ''1035.9'', ''1038.4'', ''1044.3'', ''1045.8'', ''1046.8'', ''1055.2'', ''1057.5'', ''1063.2'', ''1065'', ''1069.5'', ''1070.8'', ''1080'', ''1085'', ''1087.1'', ''1101.1'', ''1102'', ''1102.7'', ''1115.7'', ''1125.1'', ''1136.6'']
>>> li
[''926.7'', ''930.6'', ''931.7'', ''933'', ''934.1'', ''936.5'', ''937.5'', ''940.5'', ''941.6'', ''944.6'', ''945.7'', ''947.2'', ''948.6'', ''950.4'', ''953.4'', ''957'', ''958.6'', ''962.1'', ''966.5'', ''968.2'', ''969.7'', ''970.4'', ''973.1'', ''974.6'', ''975.3'', ''983.9'', ''989.8'', ''996.5'', ''999.3'', ''1001.8'', ''1006.1'', ''1010.5'', ''1011.9'', ''1012.6'', ''1013.9'', ''1023.8'', ''1034.3'', ''1035.3'', ''1035.9'', ''1038.4'', ''1044.3'', ''1045.8'', ''1046.8'', ''1055.2'', ''1057.5'', ''1063.2'', ''1065'', ''1069.5'', ''1070.8'', ''1080'', ''1085'', ''1087.1'', ''1101.1'', ''1102'', ''1102.7'', ''1115.7'', ''1125.1'', ''1136.6'']
>>> max(li)
''999.3''
>>> min(li)
''1001.8''
>>>

I don''t know why.
Can anyone answer me?

推荐答案

展开 | 选择 | Wrap | 行号




这篇关于关于max()和min()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 18:28