A tuple is ordered but its items cannot be replaced.
Tuples are useful for related values that form one whole, such as coordinates.
coordinates = (45.26, 19.83)
latitude, longitude = coordinates
print(latitude)
print(longitude)Tuple unpacking assigns each tuple value to a separate variable.
Try changing one value, then explain which part of the collection changed and why.
Keep this in mind: Read the collection operation before predicting the result.
coordinates = (45.26, 19.83)
print(coordinates)
print(coordinates[0])
latitude, longitude = coordinates
print(latitude)
print(longitude)Run the example, then change one value and observe the result.
