通过循环获取列表的索引操作: 主要使用:enumerate product_list = [['Iphone7',5800], ['Coffee',30], ['疙瘩汤',10], ['Python Book',99], ['Bike',199], ['ViVo X9',2499], ] for index,product in enumerate (product_list): print(index,product) 运行结果 /anaconda3/envs/python36-oldboy/…