commands that work on tuples in python code example
Example 1: tuples in python
t = 12345, 54321, 'hello!'
print(t[0])
print(t)
u = t, (1, 2, 3, 4, 5)
print(u)
t[0] = 88888
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
v = ([1, 2, 3], [3, 2, 1])
print(v)
Example 2: tuples in python
letters = "a", "b", "c", "d"
print(letters)
"""
tuples are immutable but it's important because they don't returns the bugs
these are sequence types means you can iterate over them by it's index numbers
tuples data can't be changed but list's data can be changed
"""