Sequence Types:
(1) sequence type: mainly including strings, lists, and metadata.
* The members are ordered, and one or more members can be accessed through the subscript offset.
(2) sequence type operators:
* Member relationship operators (in and not in): used to determine whether an element belongs to a sequence.
* Join operator (+): concatenates a sequence with another sequence of the same type.
* Repeated operator (*): Copies a sequence multiple times. Format: sequence * copies_int.
* Slice operator ([], [:], [:]): The index can be a positive value (0 <= index <= len (sequence)-1 ), you can also use a negative index (-len (sequence) <= index <=-1 ).
Format 1: sequence [index].
Format 2: sequence [start: end].
Format 3: sequence [start: end: Number of intervals].
Supplement: the index value is optional. If None is not provided or used as the index value, the slice operation starts from the beginning of the sequence or ends at the end of the sequence.
(3) built-in functions:
* Type conversion:
List (): converts an Iterated object to a list.
Tuple (): converts an iteratable object into a tuples.
Str (): converts an object to a string.
* Operable built-in functions:
Len (): returns the length of an object. This object can be sequence (string, list, and metadata) or mapping (dictionary ).
Sum ()
Reversed ()
Two strings:
List 3:
Tuples: