0

What is tupple

13th Jan 2017, 9:37 AM
Srivastav A Shashank
Srivastav A Shashank - avatar
2 Answers
+ 4
tuple is similar to a list but they cant be changed and a tuple uses () - example myTuple = (1, 2) If you try myTuple[0] = 6 will give you an error cause you cant change the elements of a tuple
13th Jan 2017, 9:44 AM
Kawaii
Kawaii - avatar
+ 4
tupple is a secquence of objects just like lists but tupple is immutable(not changable) where as lists are mutable i.e changable nums = (1, 2, 'a', 4, 'b' )#tupple nums = [1,2,'a','b']#list
13th Jan 2017, 9:45 AM
Gopikrishna A
Gopikrishna A - avatar