A lot of grammar is not clear, people and stupid, this life is impossible to memorize, can only record them on the internet, need to come over to check.
6.15
1.enumerate ()
Enter a list or tuple to return an iterator consisting of an ordinal and a value
2. Generator expressions
Use parentheses to write to a method similar to a list derivation, which can then be used for loop traversal or use next to return the next value, which will return a stopiteration exception when traversed to the end. You can save space by not calculating the list at the very beginning, but by calling one calculation at a time, but each generator expression is used only once.
3.any and all
Any takes a sequence of Boolean values that returns true as long as there is a value of true. All is required to be true only to return true.
4.Counter
Need to import functions
from Import Counter
Used to count the number of elements in a sequence
[Learning Record] Python Tips Summary (occasional updates, long-term records)