Home >Backend Development >Python Tutorial >Python mass production code sharing for 100,000 access users

Python mass production code sharing for 100,000 access users

高洛峰
高洛峰Original
2017-03-10 18:49:591404browse

This article introduces python batch production of 100,000 access user code sharing

#-*- conding:utf-8 -*-
#version:python 2.7.10
import sys
import os
import time
def User():
    txt = open('e:/python/pytest/user.txt','w')
    now = time.time()
    for i in range(1000000):
        txt.write("user%s  time=%s\n" %((i+1),time.time()-now))
    txt.close
User()


The above is the detailed content of Python mass production code sharing for 100,000 access users. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn