Tuples

coordinates = (3, 4)
print(coordinates[0])  # Output: 3
print(coordinates[1])  # Output: 4
3
4
coordinates[0] = 5  # This will give an error
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 1
----> 1 coordinates[0] = 5  # This will give an error

TypeError: 'tuple' object does not support item assignment
point = (3, 4)
x, y = point
print(x)  # Output: 3
print(y)  # Output: 4
3
4