The following example code demonstrates How to Create a Tuple in Python.

Since it is not possible to assign values to a specific element of a tuple. Therefore, the corresponding statements in the following code will result in an error.

nm = "Joe"
print(nm)

#nm[0] = 'C'

nma = ('J', 'O', 'E', 'BDN')
print(nma)
#nma[0] = 'HRY'

Output

An Example Demonstrating How to Create a Tuple in Python
An Example Demonstrating How to Create a Tuple in Python

More examples on tuples are given here.


Further Reading

Python Practice Exercise

Examples of OpenCV Library in Python

Examples of Tuples in Python

Python List Practice Exercise

A Brief Introduction of Pandas Library in Python

A Brief Tutorial on NumPy in Python

programmingempire

princites.com

IITM Software Development Cell