# 生成元组集合
tmp = {(x, x+1) for x in range(10)}
print(type(tmp))
print(tmp)
# 生成列表集合
tmp = {[x] for x in range(10)}
print(tmp)
转载于:https://www.cnblogs.com/lizitest/p/9553615.html
# 生成元组集合
tmp = {(x, x+1) for x in range(10)}
print(type(tmp))
print(tmp)
# 生成列表集合
tmp = {[x] for x in range(10)}
print(tmp)
转载于:https://www.cnblogs.com/lizitest/p/9553615.html