Home >>Python Built-in Functions >Python tuple() Function
Python tuple() function is used to create a given tuple object.
Syntax:tuple(iterable)
Parameter | Description |
---|---|
iterable | This is a required parameter. It defines a sequence, collection or an iterator object. |
x = tuple(("apple", "banana", "mango", "orange"))
print(x)
x = tuple((1, 2, 3, 4, 5, 6, 7, 8, 9))
print(x)