该文被密码保护。 阅读全文
posted @ 2021-06-13 21:15 等待iing 阅读(5) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2021-06-13 21:14 等待iing 阅读(5) 评论(0) 推荐(0)
摘要: 1 # import xlrd 2 # # xlrd 用来读Excel 3 # # xlwt 用来写excel 4 # book = xlrd.open_workbook('test.xlsx') 5 # # 根据sheet名字 6 # # sheet = book.sheet_by_name('s 阅读全文
posted @ 2021-06-13 21:12 等待iing 阅读(60) 评论(0) 推荐(0)
摘要: 1 def add(a,b): 2 return a+b 3 4 d = {"a":1,"b":2} # 两个**代表传的是字典 5 L= [1,2,3] # 一个*代表传的是list 6 print(add(**d)) 7 print(*L) 阅读全文
posted @ 2021-05-25 17:23 等待iing 阅读(54) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2021-05-25 17:17 等待iing 阅读(6) 评论(0) 推荐(0)
摘要: 1 import pymysql 2 ip = 'XX,XX,XX,XX' 3 user = 'XXX' 4 password = 'XXX' #密码必须是字符串 5 db = 'XXX' 6 port = 3306 #端口号必须写int类型 7 8 connect = pymysql.connec 阅读全文
posted @ 2021-05-25 17:16 等待iing 阅读(60) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2021-05-25 17:14 等待iing 阅读(7) 评论(0) 推荐(0)
摘要: 1 import faker 2 # 可用于造数据 方便 3 #如果要生成中文的随机数据,我们可以在实例化时给locale参数传入‘zh_CN’ 4 f = faker.Faker(locale="zh_CN") #随机 5 print(dir(f)) #列出当前函数有哪些方法 6 7 print( 阅读全文
posted @ 2021-05-25 17:13 等待iing 阅读(49) 评论(0) 推荐(0)
摘要: 1 import faker,xpinyin 2 # f = faker.Faker(locale='zh-CN') 3 # for i in range(100): 4 # print(f.name()) 5 6 # b = "胡月梅" 7 # c = xpinyin.Pinyin() 8 # d 阅读全文
posted @ 2021-05-25 17:12 等待iing 阅读(159) 评论(0) 推荐(0)
摘要: 1 import random 2 3 print(random.randint(100000,99999)) #随机整数 4 5 print(random.uniform(1,99)) #随机小数 6 7 a = '1234566' 8 9 L = [2.23.24.23.545.4151] 10 阅读全文
posted @ 2021-05-21 11:09 等待iing 阅读(36) 评论(0) 推荐(0)