MindMap Gallery List in python (List)
This is a mind map about a list (List), whose main contents include: addition, deletion, modification and search of lists, operation methods and functions of lists, operators of lists, access and slices of lists, and creation of lists.
Edited at 2025-02-11 09:55:23In order to help everyone use DeepSeek more efficiently, a collection of DeepSeek guide mind map was specially compiled! This mind map summarizes the main contents: Yitu related links, DS profile analysis, comparison of DeepSeek and ChatGPT technology routes, DeepSeek and Qwen model deployment guide, how to make more money with DeepSeek, how to play DeepSeek, DeepSeek scientific research Application, how to import text from DeepSeek into MindMaster, the official recommendation of DeepSeek Wait, allowing you to quickly grasp the essence of AI interaction. Whether it is content creation, plan planning, code generation, or learning improvement, DeepSeek can help you achieve twice the result with half the effort!
This is a mind map about DeepSeek's 30 feeding-level instructions. The main contents include: professional field enhancement instructions, interaction enhancement instructions, content production instructions, decision support instructions, information processing instructions, and basic instructions.
This is a mind map about a commercial solution for task speech recognition. The main content includes: text file content format:, providing text files according to the same file name as the voice file.
In order to help everyone use DeepSeek more efficiently, a collection of DeepSeek guide mind map was specially compiled! This mind map summarizes the main contents: Yitu related links, DS profile analysis, comparison of DeepSeek and ChatGPT technology routes, DeepSeek and Qwen model deployment guide, how to make more money with DeepSeek, how to play DeepSeek, DeepSeek scientific research Application, how to import text from DeepSeek into MindMaster, the official recommendation of DeepSeek Wait, allowing you to quickly grasp the essence of AI interaction. Whether it is content creation, plan planning, code generation, or learning improvement, DeepSeek can help you achieve twice the result with half the effort!
This is a mind map about DeepSeek's 30 feeding-level instructions. The main contents include: professional field enhancement instructions, interaction enhancement instructions, content production instructions, decision support instructions, information processing instructions, and basic instructions.
This is a mind map about a commercial solution for task speech recognition. The main content includes: text file content format:, providing text files according to the same file name as the voice file.
List
Creation of list
1. Use basic syntax[]
2. Use list() function to create
3. Create an integer list using range()
start optional, indicating the starting number, default is 0
end Required Indicates the ending number
step optional Indicates step size, default is 1
List access and slice
List access: list[index] accesses elements with index index
Slice of list: [start:stop:step]
start (optional): indicates the index position at the beginning of the slice (including the corresponding characters at that position). The default value is 0, that is, start from the beginning of the string. If it is a negative number, count forward from the end of the string, for example -1 indicates the position of the last character.
stop (optional): indicates the index position at which the slice ends (not including the characters corresponding to this position). # The default value is the length of the string, which is to be intercepted to the end of the string. If it is a negative number, count forward from the end of the string.
step (optional): represents the step size of the slice, that is, one for every number of characters, the default value is 1. When the step size is positive, slice from left to right; when the step size is negative, slice from right to left.
List operator
Splicing between multiple lists
* Copy and add list
in and not in
List operation methods and functions
len() Gets the number of elements in the list
index() gets the index index of the element in the list
count() Gets the number of times an element appears in the list
sum() gets the sum of all elements in the list
max() gets the maximum value of the element in the list
min() Gets the minimum value of the element in the list
sort() sorts the elements in the list
sorted() sorted produces a new list
reverse() list elements in reverse sort
Add, delete, modify and check list
Adding list
append() adds an element at the end of the list lst = [1, 2, 3] lst.append(4)
insert() adds an element at the specified location of the list lst = [1, 2, 3] lst.insert(1, 'a')
extend() appends multiple values of another sequence at one time at the end of the list lst1 = [1, 2, 3] lst2 = [4, 5] lst1.extend(lst2)
Deletion of list
del Delete elements in the specified position in the list list my_list = [1, 2, 3, 4] del my_list[2]
pop() deletes elements based on the index and can be returned. Delete the last one without writing by default my_list = [1, 2, 3, 4] my_list.pop(2)
remove() Remove the first match of a value in the list my_list = [1, 2, 3, 4] my_list.remove(3)
clear() delete all, clear the list
Modification of the list
my_list = [1, 2, 3, 4] my_list[1] = "Two"
Search for lists
my_list = [1, 2, 3, 4] a = 5 in my_list b = 1 in my_list