5_元组()

a = (1, 2, 3, 4, 5, "上山打老虎")
# (1, 2, 3, 4, 5, '上山打老虎')
print(a)
# 4
print(a[3])
# (1, 2, 3, 4, 5, '上山打老虎')
print(a[:])
# (1, 3, 5)
print(a[::2])
# ('上山打老虎', 5, 4, 3, 2, 1)
print(a[::-1])

s = (1, 2, 3)
t = (4, 5, 6)
w = (s, t)
# (1, 2, 3, 4, 5, 6)
print(s+t)
# ((1, 2, 3), (4, 5, 6))
print(w)
b = (123, "我爱你", "你爱我吗", 99999)
x, y, z, m = b
# 123  我爱你   你爱我吗    99999
print(x, "\n",  y, "\n", z, "\n", m)
x, y = 10, 20
print(x)
print(y)
————————
a = (1, 2, 3, 4, 5, "上山打老虎")
# (1, 2, 3, 4, 5, '上山打老虎')
print(a)
# 4
print(a[3])
# (1, 2, 3, 4, 5, '上山打老虎')
print(a[:])
# (1, 3, 5)
print(a[::2])
# ('上山打老虎', 5, 4, 3, 2, 1)
print(a[::-1])

s = (1, 2, 3)
t = (4, 5, 6)
w = (s, t)
# (1, 2, 3, 4, 5, 6)
print(s+t)
# ((1, 2, 3), (4, 5, 6))
print(w)
b = (123, "我爱你", "你爱我吗", 99999)
x, y, z, m = b
# 123  我爱你   你爱我吗    99999
print(x, "\n",  y, "\n", z, "\n", m)
x, y = 10, 20
print(x)
print(y)