Flat 10% & upto 40% off + 10% Cashback + Free additional Courses. Hurry up

Python Tuples


Tuple is an ordered collection of arbitrary objects. They work exactly like lists, except that tuples can’t be changed in place because they are immutable and parentheses are used rather than square brackets. If parenthesis is not specified then it by default treated as tuple. Tuples share most of their properties with lists. They are:

  • Accessed by offset
  • Of the category immutable sequence
  • Fixed length, heterogeneous, arbitrarily nestable
  • Arrays of object references


T1 =(1, 2, 3,"intellipaat")

print T1


(1, 2, 3,’intellipaat’)

Tuples are accesses same like as list.


Operations on List

On list following operation are performed:


  • Concatenate Tuple

+ Operator is used to concatenate two tuples.

T1 = (1, 2, 3, 4)

T2 = (5, 6, 7, 8)

print T1+T2


(1, 2, 3, 4, 5, 6, 7, 8)


  • Replicate Tuples

Operator * is used to repeat a tuple by specific number of time.


print T1*2


(1,2, 1, 2)


  • Sub Tuple

It is used to obtain a sub Tuple which is done by specifying the index.

T1 = (1, 2, 3, 4)

print T1[0:3]


(1, 2, 3)


  • Update List

Updation is not possible in tuple because tuples are immutable objects.


  • Deletion

In tuple you cannot delete individual value in tuple. Using del you can delete entire tuple at a time.

T1 = (1, 2, 3, 4)

del T1

print L1


Traceback (most recent call last):

File “C:/Python27/”, line 3, in

print T1

NameError: name ‘T1’ is not defined


Functions in Tuple

Function Description
min(tuple) Returns the minimum value from a tuple
max(tuple) Returns the maximum value from the tuple
len(tuple) Gives the length of a tuple
tuple(sequence) Converts the sequence into tuple
cmp(tuple1,tuple2) Compares the two tuple

"0 Responses on Python Tuples"

100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.

Sales Offer

  • To avail this offer, enroll before 21st February 2018.
  • This offer cannot be combined with any other offer.
  • This offer is valid on selected courses only.
  • Please use coupon codes mentioned below to avail the offer

Sign Up or Login to view the Free Python Tuples.