摘要: 数字前面补0 字符型: print('23'.zfill(5)) 数字型: print('%011d' % 124) 日期与str互转: datetime 转 str str_date = datetime.now().strftime("%Y-%m-%d") (%04d%02d%02d)此种格式化 阅读全文
posted @ 2019-01-08 16:39 追星骑士 阅读(233) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-# python 3.6import pymssql conn=pymssql.connect(host='*****',user='******',password='*******',database='****') ''' 如果和本机数据库交互,只需修改链接字符串 conn=pymssql.connect(host='.',database=... 阅读全文
posted @ 2018-12-27 13:15 追星骑士 阅读(2998) 评论(0) 推荐(0) 编辑