标签: python-3.7
当我运行这段代码时
courses = ['Math', 'Science', 'Latin', 'Astronomy'] for index, course in enumerate(courses): print(index, course)
我得到这个结果
(0, 'Math') (1, 'Science') (2, 'Latin') (3, 'Astronomy')
代替
0 Math 1 Science 2 Latin 3 Astronomy