Python tuple() built-in function

From the Python 3 documentation

Rather than being a function, tuple is actually an immutable sequence type, as documented in Tuples and Sequence Types — list, tuple, range.

Examples

>>> t = tuple()
>>> type(t)
# <class 'tuple'>
>>> t
# ()

>>> l = [1, 2, 3]
>>> tuple(l)
# (1, 2, 3)

Ups! Nothing here yet!

This is a great opportunity for you to collaborate! Hit the link at the end of this page and add some examples and a brief description. If you don't know where to start, the Python 3 documentation will lead you in the right direction.

Subscribe to pythoncheatsheet.org

Join 9.800+ Python developers in a two times a month and bullshit free publication , full of interesting, relevant links.