06 2020 档案

摘要:昨天在李哥帮忙检验我学习效果的时候我使用pymysql出现了以下的错误 1 python-module 'pymysql' has no attribute 'connect' 一出错 我本能的想去看下是不是我没连接成功 然后 pip3 install pymysql不要起import的包名作为文件 阅读全文
posted @ 2020-06-16 01:16 什么都不懂的小小孩 阅读(88) 评论(0) 推荐(0)
摘要:string.strip([chars]) 方法删除字符串开头和结尾指定的字符或字符序列(即不能删中间字符)。 string.lstrip([chars]) 方法删除字符串开头指定的字符或字符序列(即不能删中间字符)。(l - left - strip 左侧,即开头) string.rstrip([ 阅读全文
posted @ 2020-06-08 19:48 什么都不懂的小小孩 阅读(228) 评论(0) 推荐(0)
摘要:具体使用方法: #json.dumps 实现python类型转化为json字符串 #ensure_ascii=False实现让中文写入的时候保持为中文 json_str = json.dumps(mydict,indent=2,ensure_ascii=False) #json.loads 实现js 阅读全文
posted @ 2020-06-08 18:48 什么都不懂的小小孩 阅读(400) 评论(0) 推荐(0)