📜  # 获取列表中的最大数字并打印其索引 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:15.637000             🧑  作者: Mango

代码示例1
numbers = 1,3,11,42,12,4001
highestnumber = -999
for i in numbers:
  if i > highestnumber:
    highestnumber = i
print(numbers.index(highestnumber))