"""
测试元组
"""
# 基础
x = 1,2,3
print(x)
x = (1,2,3)
print(x)
# 空元组
x = ()
print(x)
# 只有一个数的元组
x = 1,
print(x)
# 类型转换
x = tuple([1,2,3])
print(x)
(1, 2, 3)
(1, 2, 3)
()
(1,)
(1, 2, 3)
"""
测试元组
"""
# 基础
x = 1,2,3
print(x)
x = (1,2,3)
print(x)
# 空元组
x = ()
print(x)
# 只有一个数的元组
x = 1,
print(x)
# 类型转换
x = tuple([1,2,3])
print(x)
(1, 2, 3)
(1, 2, 3)
()
(1,)
(1, 2, 3)