gpt4 book ai didi

python - Python中列表列表的最大值

转载 作者:太空宇宙 更新时间:2023-11-04 11:09:35 26 4
gpt4 key购买 nike

<分区>

我正在寻找列表列表中项目 [6] 的最大值。我还需要列表的索引。在这种情况下,13 vs 23 = 23 和比较 [1]。有什么办法吗?

comparation = [
[(Timestamp('2018-02-08 00:00:00'), 26, 211.8711395263672), (Timestamp('2018-02-21 00:00:00'), 34, 222.0032501220703), 1.2665138244628906, 178.94178009033203, 'MIN', (39, Timestamp('2018-02-28 00:00:00')), 13, 398],
[(Timestamp('2018-02-08 00:00:00'), 26, 211.8711395263672), (Timestamp('2018-03-02 00:00:00'), 41, 220.2726287841797), 0.5600992838541666, 197.30855814615884, 'MIN', (49, Timestamp('2018-03-14 00:00:00')), 23, 388]
]

b = [max(p) for p in comparation]

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com