Home »
Python
Creating tuple without using parenthesis in Python
Last Updated : December 11, 2025
In Python, it is possible to create a tuple without using parentheses. This concept is known as tuple packing. You can also use other approaches to create tuples without parentheses, such as using the tuple() constructor or creating nested tuples.
Approach 1: Tuple Packing
Tuple packing allows you to create a tuple by simply separating values with commas, without the need for parentheses. This is the simplest way to declare a tuple directly.
Example
In the following example, we are creating a tuple named student using tuple packing, then unpacking it into separate variables and printing the values.
# declaring tuple containing student's information
# without using parentheses
student = "prem", 21, 98.56, "New Delhi"
# printing its type
print('Type of student:', type(student))
# printing the tuple
print("student: ", student)
# unpacking tuple and printing each value
name, age, perc, city = student
print('Name:', name)
print('Age:', age)
print('Percentage:', perc)
print('City:', city)
When you run the above code, the output will be:
Type of student: <class 'tuple'>
student: ('prem', 21, 98.56, 'New Delhi')
Name: prem
Age: 21
Percentage: 98.56
City: New Delhi
Approach 2: Using the tuple() Constructor
You can create a tuple from an iterable, such as a list, using the tuple() function. This method does not require parentheses around individual elements.
Example
In the following example, we are converting a list into a tuple using the tuple() function.
numbers_list = [1, 2, 3, 4]
numbers_tuple = tuple(numbers_list)
print('Tuple:', numbers_tuple)
When you run the above code, the output will be:
Tuple: (1, 2, 3, 4)
Approach 3: Nested Tuples Without Parentheses
You can also create nested tuples without parentheses by separating existing tuples with commas. This allows combining multiple tuples into one nested tuple.
Example
In the following example, we are creating a nested tuple by combining two tuples without using parentheses explicitly.
t1 = 'Python', 'Tuple'
t2 = 'Includehelp', 'Best'
nested_tuple = t1, t2
print('Nested tuple:', nested_tuple)
When you run the above code, the output will be:
Nested tuple: (('Python', 'Tuple'), ('Includehelp', 'Best'))
Advertisement
Advertisement