'''
取列表中最大值的索引值
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基础之取列表中最大值的索引值
原创文章标签 python基础练习 文章分类 Python 后端开发
©著作权归作者所有:来自51CTO博客作者ziwenzhou的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:python基础之猜数字游戏
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章