python 字典解析


# 字典解析式
tmp = {x:(x, x+1) for x in range(10)}
print(tmp)

tmp = {x:[x, x+1] for x in range(10)}
print(tmp)
posted on 2018-08-29 12:50  栗子测试  阅读(2448)  评论(0编辑  收藏  举报