Page 1 of 1

Python: Making a Tuple

Posted: Mon Aug 25, 2025 1:58 am
by Jason

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"))