nums = [5, 15, 35, 8, 98] for num_index, num_val in enumerate(nums): print(num_index, num_val) 转载于:https://www.cnblogs.com/sea-stream/p/9967715.html