摘要: 1.split分隔url链接提取相关信息,split是函数,提取可用索引[] url = ' https://img2.baidu.com/it/u=2108319215,1494231136&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=690' a = url.s 阅读全文
posted @ 2021-09-16 20:51 索匣 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 一直都以为format()括号内要匹配带匹配的字符串,没想到还可以把要匹配的字符串也放入format()函数中, 虽然里面用了%处理字符串把,但觉得这样看上去很pythonic url = 'https://www.qiushibaike.com/imgrank/page/%d/' # 用pytho 阅读全文
posted @ 2021-09-16 19:43 索匣 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Mysql相关操作 一开始打开数据库,查找某个数据库的名字,或者查看某个数据库中的表的设计 可进行如下操作 1.show databases;显示已有的数据库 2.use databasename;选择数据库 3.describe tablename;表的详细描述 4.show tables显示表 阅读全文
posted @ 2021-09-16 16:51 索匣 阅读(31) 评论(1) 推荐(0) 编辑