This article describes the actual operation steps of the python for computer language in practical applications. If you are interested in python, you can use our article to learn more about the actual application solutions. The following is a detailed introduction of the article.
I have never written a python script before, so I found a simple tutorial and did it again. These two days I tested the performance of the mysql archive engine, so I used python to insert 1 billion pieces of data into the archive table. python is roughly written as follows:
- for i in range(0,100000000)
- insert into ….
-
After the execution of the results, the system crashed and asked for "Viagra". At last, when the script was executed again, the for in range ended the memory and searched for it in the python for document, obtain the following information:
- range([start], stop[, step])
- This is a versatile function to create lists
containing arithmetic progressions. It is most often
used in for loops.
-
Originally, python for directly created a list containing 1 billion integers, 1 billion * 4 byte = 40 000 0000 byte = 400 GB, and then the system memory was consumed directly.