Article From:https://www.cnblogs.com/sea-stream/p/9967715.html

 

nums = [5, 15, 35, 8, 98]  
for num_index, num_val in enumerate(nums):  
    print(num_index, num_val)

 

Leave a Reply

Your email address will not be published. Required fields are marked *