Python: Making a Tuple
Posted: Tue Apr 07, 2026 5:23 pm
Code: Select all
# Tuples can have duplicates, are ordered, elements can't be changed.
tuple_of_some_colors = ("red", "green", "purple", "orange", "blue")
print(tuple_of_some_colors)
# Another way to make a Tuple below
tuple_of_some_sizes = tuple(("big", "medium", "small"))