The basic usage of Python tuples

1  "" " basic usage Python tuples " "" 
2  
. 3  # del TUP: Delete tuple (a tuple of elements can not be deleted, but can be used to delete the entire tuple del) 
. 4 TUP = ( ' the Google ' , ' Runoob ' )
 . 5  del TUP
 . 6  Print (TUP)
 . 7  
. 8  # tuple (SEQ) converts a list of tuples 
. 9 SEQ = [ " language " , " mathematics " , " English " ]
 10 TUP = tuple (SEQ)
 11  Print (TUP)
The basic usage of Python tuples

 

Guess you like

Origin www.cnblogs.com/Junlong/p/11391413.html