PythonBuilt-intuple
list

tupleBuilt-in

set

Converts an iterable to a tuple.

Syntax

tuple(iterable?)

Example

Enter values below to update the example in real time.

print
tuple
print(tuple([1, 2, 3]))   # (1, 2, 3)
print(tuple("abc"))       # ('a', 'b', 'c')