A tuple is an immutable list : Variable Immutable « Language Basics « Python






A tuple is an immutable list

A tuple is an immutable list

t = ("a", "b", "mpilgrim", "z", "example")        

print t 

print t[0]                                        

print t[-1]                                       

print t[1:3]                                      
           
       








Related examples in the same category

1.Strings (and numbers and tuples) are immutableStrings (and numbers and tuples) are immutable