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

浙公网安备 33010602011771号