摘要: import pymysqlconn = pymysql.connect(host='118.24.3.40',user='jxz',password='123456',port=3306,db='jxz',charset='utf8',autocommit=True)cur = conn.curs 阅读全文
posted @ 2018-12-10 23:19 狐觞 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 安装第三模块 1、pip install xxx pip问题 1、提示没有pip命令的, 把python的安装目录、 安装目录下面的scripts目录加入到环境变量里面 2、Unknown or unsupported command 'install' 1、先执行 where pip 2、找到不是 阅读全文
posted @ 2018-12-10 23:18 狐觞 阅读(159) 评论(0) 推荐(0) 编辑
摘要: def my_md5(s): news = str(s).encode() m = hashlib.md5(news) return m.hexdigest() 阅读全文
posted @ 2018-12-10 23:16 狐觞 阅读(135) 评论(0) 推荐(0) 编辑
摘要: # sorted 排序# map 循环调用函数的,保存返回值# filter 循环调用函数,如果函数返回false,那么就过滤掉这个值,是指从你传入的这个list里面过虑。 def abc(num): if num%2==0: return True return False res = list( 阅读全文
posted @ 2018-12-10 22:09 狐觞 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #递归就是函数自己调用自己count = 0# def abc():# pass# abc()最多循环999次 阅读全文
posted @ 2018-12-10 22:08 狐觞 阅读(104) 评论(0) 推荐(0) 编辑