One, Python data type
integer int
String
Lists List
1, the list can be modified
2. The list contains multiple strings
3. The list can be indexed, sliced, indexed starting from 0, 1 for right-to-left
add element functions to the list:
Append (value) adds an element to the list, and the added element is at the end of the list
Insert (subscript, value) adds a value at the specified position, and the original element moves back
list Delete element function
Pop () to delete the element at the specified position
Remove () deletes the specified value
Clear () empties the list value
del empty list
List modification Elements
Direct modification after locating elements
lists[0]= ' 123456 '
List query elements
Use subscript to take the value
Other Functions
1, get the element subscript: index ()
2. Count the number of occurrences of a value in the list, counted ()
3. Reverse the string in the list, reverse ()
4, List sort, sort () ascending order, sort (reverse=true) descending order
5. List 1+ List 2, merge 2 lists
6, List 1*10, List 1 show 10 times
No group
Dictionary
Python data type