Python tuple() FunctionLast Updated : 17 Mar 2025 In Python, the tuple() function is used to create a tuple object. Python tuple() Function SyntaxIt has the following syntax: Parameters
ReturnIt returns a tuple. Python tuple() Function ExampleThe below example creates tuple using the tuple() function in Python. Output:
t1= ()
t2= (1, 6, 9)
t1= ('J', 'a', 'v', 'a')
t1= (4, 5)
Explanation: In the above example, we have taken an empty tuple named as t1 which returns empty values. In the second case, we have created a tuple from a list, i.e., t2 which return its values. In the third case, we have created a tuple from the string which returns the string values. In the fourth case, we have created a tuple from the dictionary, which returns its values. Next TopicPython Built in Functions |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India