Home >Backend Development >Python Tutorial >What does tuple mean in python?
What does tuple refer to in python?
tuple in python refers to tuple. Python’s tuple is similar to a list, the difference is that the tuple Group elements cannot be modified.
Use parentheses for tuples and square brackets for lists.
Tuple creation is very simple, just add elements in brackets and separate them with commas.
The following examples:
Examples (Python 2.0)
tup1 = ('physics', 'chemistry', 1997, 2000) tup2 = (1, 2, 3, 4, 5 ) tup3 = "a", "b", "c", "d"
Recommended learning: "Python Tutorial"
The above is the detailed content of What does tuple mean in python?. For more information, please follow other related articles on the PHP Chinese website!