重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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://cqcxhl.com/article/pdoojs.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP