tuple() function creates a new tuple.
iterable parameter is optional and is an object that can be looped over, such as a list or string. If an
iterable is not provided, an empty tuple is created.
The following is an example of how the
tuple() function is used to create a new tuple from a list:
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Learn Python on Codecademy
Computer ScienceLooking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
Includes 6 Courses
With Professional Certification