Tuples in Python

A Tuple is a collection which is ordered and immutable. Tuples are just like list. The main difference b/w tuple and list is that List use square bracket while Tuple use parentheses. And list item cnb be changed while in Tuple can not changed.

Create Tuple like that

>>> tuple1 = (23, 45, 67, 'Apple')
>>> print(tuple1)
(23, 45, 67, 'Apple')


Total Views: 355