📜  List Comprehension 构建元组列表 - 无论代码示例
📅  最后修改于: 2022-03-11 14:57:46.732000             🧑  作者: Mango
代码示例1
# build a list of tuples
li = [ (i,i*2) for i in range(1,5)]
print(li)
# [(1, 2), (2, 4), (3, 6), (4, 8)]