tuple()

Built-in FunctionPython 2.0+Beginner

Creates a new immutable tuple

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
t = tuple([1, 2, 3])
print(t)
t2 = tuple("hello")
print(t2)

tuple() is a built-in function that creates a new immutable tuple.

Try in Playground

Tags

builtinfunctioncoredatatypesequenceimmutablehashable

Related Items