Python list 间隔两个取数值
l1 = ["a", "b", "c", "d", "e", "f"] print(len(l1) / 2) for i in range(int(len(l1) / 2)): print(l1[i * 2], l1[i * 2 + 1])
执行结果
posted on 2022-04-13 14:56 星河赵 阅读(1100) 评论(0) 编辑 收藏 举报