Wednesday, January 17, 2018

Tuples in Python


  • Tuples are sequence of immutable objects
  • They do not support item assignment
  • They are created using ()
Example
tup1 = ('physics', 'chemistry', 1997, 2000)
tup2 = (1, 2, 3, 4, 5 )
tup3 = "a", "b", "c", "d"
tup1 =(); //Empty tuples



More examples for tuples

No comments:

Post a Comment