#! C:\Python#!/usr/bin/env python#-*-coding:utf-8-*-ImportstringImportRandomminlength= 6maxlength= 16Mobile_begin_seed= ['134','135','136','137','138','139',' Max','151',' the','157','158','159','182','183','187','188',' the','131',' the','155','156','175','185','186','133','153','177',' the','181','189']mobile_seed=String.digitsusername_seed= string.digits+String.ascii_letterspassword_seed= string.digits+string.ascii_letters+String.punctuation Mobile= Random.choice (mobile_begin_seed) +"'. Join (Random.choice (mobile_seed) forMinchRange (8)) Username="'. Join (Random.choice (username_seed) forUinchRange (Random.randint (minlength,maxlength))) Password="'. Join (Random.choice (password_seed) forPinchRange (Random.randint (minlength,maxlength))) with open ("E:\log.log",'a') as Log,open ("E:\mobile.txt",'a') as Phone:log.write (username+'\ n') log.write (password+'\ n') Phone.write (Mobile+'\ n')Print "The random Generation Mobile is:", MobilePrint "The random generation username is:", usernamePrint "The random generation password is:", password
Python randomly generates user name, password, mobile phone number