Python tuple() Function
The tuple() function creates a tuple object. A tuple is a
collection which is ordered and unchangeable.
Syntax
tuple(iterable)
Parameters
| Parameter | Description |
|---|---|
iterable |
Optional. A sequence, collection or an iterator object |
Return Value
A tuple object.
Example
Using the tuple() function:
Output
Click Run to execute your code
Enjoying these tutorials?