400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

python基础之取列表中最大值的索引值

'''
取列表中最大值的索引值
www.pythontutor.com
'''

list_group = [5,90,59,132,54]
max_index = 0
list_index = 0
for num in list_group:
    if num > list_group[max_index]:
        max_index = list_index
    list_index += 1
print(max_index)

分享名称:python基础之取列表中最大值的索引值
分享链接:http://www.bluegullmedia.com/article/pdoojs.html

其他资讯

让你的专属顾问为你服务

0.0443s