![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程题库
前热火球员LeBron James
A programmer who can't play basketball is not a good cook
展开
-
正则表达式判定电话号码(电信移动联通)
'''1、写一个正则,能验证是否是合法的手机号。可以了解下移动联通电信手机号的号码段'''import redef phone(): n = input("请输入一个手机号:") if re.match(r'1[3,4,5,7,8]\d{9}', n): print("该号码合法:", n) # 中国联通: # 130,13...原创 2018-08-22 20:28:41 · 2689 阅读 · 0 评论 -
pymysql用户登录(密码加密)和封装经典实例
(1)packaging.py 里面封装好方法import pymysqlimport hashlibclass MysqlHelper(): def __init__(self, host, database, user, password, port=3306,charset='utf8'): self.host = host self.por...原创 2018-08-30 17:12:52 · 4012 阅读 · 0 评论