Gold * Python Development engineer:
1. String connection + and join differences:
This paper mainly investigates two ways of memory management:
The string object is immutable, and after Python creates a string, you cannot change a part of the character. any operation on the string includes the ' + ' operator, each time ' + ' connection will request a memory space, create a new string object to deposit, instead of changing the original object.
join ([]), using the list concatenation, the list can be changed, so use ". Join ([]) concatenated into a string, requested a memory space, built once, save a lot of resources and time.
Note: The string immutable phenomenon is also a workaround, you can use the _strlist=list (str) This built-in function to change the STR to a single character as a member of the list, so that can be used _strlist[3]= ' A ' change the value and then use '. Join (_strlist) to revert to a string.
2. How to determine if an SQL query hits a defined index:
3. Differences between InnoDB and Myiasm engines (main question index):
The data structures are all B+tree
MYIASM, the content stored in theb+tree data structure is the address value of the information, that is, the index is separate from the actual data, and the index is used to point to the data, which is called a nonclustered index .
Innodb, the actual data stored in the b+tree data structure is called a clustered index .
The fundamental difference between clustered and nonclustered indexes is that table records are arranged in the same order as the index, and the order of the clustered Index table records is the same as the order in which the indexes are arranged. The insertion is slower than the nonclustered index and the query is faster;
4. The implementation of the adorner:
5. Ask Docker, no understanding, no answer.
6.contentmanger
Bean * Python Development engineer:
-
Specifies the number of the oldest string in a string that is equal to numbers.
Def get_str (s, n): i = n _start = 0 _list =[] while true: if i <= len (s) and _start <= len (s): _str = len (Set (S[_START:I)) if _str == n: _list.append (S[_start:i]) i += 1 elif _str < n: i += 1 else: _start += 1 i = _start + n else: break _list = sorted (_list, key=lambda x:len (x)) RETURN&NBSP;_LIST[-1]
-
function implementation? , * wildcard characters.
-
design article, user recommendation Information table structure:
i. Write out an article all the recommended user SQL query statements.
ii. Write down all the recommendations of a user and sort the statements in reverse chronological order.
III. Delete the content of the conspiracy and related recommendations.
Python Interview Summary