隔江千里
你可以简单地通过 python range function range(start, end, stepsize)final_lst = []for i in range(10, 200, 10): final_lst.append([i, i+10])print(final_lst)输出[[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110], [110, 120], [120, 130], [130, 140], [140, 150], [150, 160], [160, 170], [170, 180], [180, 190], [190, 200]]::编辑::for i in range(1, 10): print('%s: (%s,%s),'%(i, i*10, (i+1)*10))输出1: (10,20),2: (20,30),3: (30,40),4: (40,50),5: (50,60),6: (60,70),7: (70,80),8: (80,90),9: (90,100),