Tuple tuples
Tuples cannot be changed once they are created
Representation method:
name1= ("Luo", "gu", "Hu")
Within a tuple, it can be a string, a number, or a mixed type
For a tuple operation, the following functions are available:
#1, CMP (name1,name2): Elements used to compare two tuples
#2, Len (name1): Number of tuple elements
#3, Max (NAME1): Returns the maximum value in the tuple
#4, Min (name1): Returns the minimum value in the tuple
#5, tuple (list): Converts a tuple to a list, or a list to a tuple
Description: The values in the tuple are immutable
Second, the list operation contains the following methods:
#1, del name1 Delete tuples
#2, List.count (obj): Counts the number of occurrences of an element in a tuple
#3, Tuple.index (obj): Find the index position of the first occurrence of a value from a tuple (subscript)
#4, Tuple.reverse (): an element in a reversed tuple
#5, Tuple.sort ([]): Sorting primitive tuples
Python tuple (tuple)