Create a Tuple in python program in Python

Create a Tuple in python program in Python programming language. A Tuple is a comma-separated collection of Python objects. In terms of indexing, nested objects, and repetition, a tuple is comparable to a list, but a tuple is immutable, whereas lists are mutable. This is an advanced data structure programming in python language

a = ()
print(a)
tuplea = tuple()
print(tuplea)

 

Output:

()                                                                     

()

How to create a tuple list in python

Put all the items in a () parenthesis, separated by commas, to make a tuple in Python. A tuple may include heterogeneous data pieces, as well as string and list data items.

A Tuple is a comma-separated collection of Python objects. In terms of indexing, nested objects, and repetition, a tuple is comparable to a list, but a tuple is immutable, whereas lists are mutable.