摘要:
import random '''手机号的规则如下第一位:1;第二位:3,4,5,7,8第三位:3:0-94:5,6,75:0,1,2,3,5,6,7,8,97:6,7,88:0-9'''def telphone(): second = random.choice([3,4,5,7,8])#第二位值 阅读全文
摘要:
一、赋值 alist = ["a","b","c",[5,6],10]aa = alistalist.append("yu")aa.append("iop")alist[3].append(99)alist[3].append("test")print(alist)print(aa) 执行结果如下: 阅读全文
摘要:
import pymysqlfrom random import randint#连接数据库db_connect = pymysql.connect("localhost","root","123456","test")cursor = db_connect.cursor() #通过循环语句插入数据 阅读全文
摘要:
一、导入相关的包 import pymysqlimport xlsxwriterimport time 二、创建excel并连接数据库 #创建excel表now_time = time.strftime("%Y_%m_%d_%H")persons_excel = xlsxwriter.Workboo 阅读全文