📜  带有枚举python代码示例的for循环

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

代码示例1
presidents = ["Washington", "Adams", "Jefferson"]
for num, name in enumerate(presidents, start=0):
    print("President {}: {}".format(num, name))