摘要: https://www.icourse163.org/learn/ZJU-1206456840 https://pintia.cn/problem-sets/1497398176843997184/problems/1497398251064791057 7-3 阶梯电价 分数 30 作者 陈春晖 阅读全文
posted @ 2022-05-19 21:34 孤舟浮岸 阅读(3483) 评论(0) 推荐(0) 编辑
摘要: https://www.icourse163.org/learn/ZJU-1206456840 https://pintia.cn/problem-sets/1497398176843997184/problems/1497398251064791050 Python程序设计第二章(MOOC) 17 阅读全文
posted @ 2022-05-19 21:18 孤舟浮岸 阅读(1612) 评论(0) 推荐(0) 编辑
摘要: https://www.runoob.com/python/python-func-int.html int() 方法的语法: class int(x, base=10) x -- 字符串或数字。 base -- 进制数,默认十进制。 错误示例 int("92",8) 异常类型:ValueError 阅读全文
posted @ 2022-05-19 19:16 孤舟浮岸 阅读(888) 评论(0) 推荐(0) 编辑
摘要: 对齐: < (默认)左对齐、> 右对齐、^ 中间对齐 ^中间对齐的代码示例 # 20的位置只能是常量,10的位置可以是int类型的变量 # 20表示占用20个长度的位置,10表示有10个* print('{:^20}'.format('*'*10)) 控制台输出 ********** 进程已结束,退 阅读全文
posted @ 2022-05-19 18:03 孤舟浮岸 阅读(24) 评论(0) 推荐(0) 编辑
摘要: strip()方法,去除字符串开头或者结尾的空格 https://www.cnblogs.com/valorchang/p/11470901.html 阅读全文
posted @ 2022-05-19 17:11 孤舟浮岸 阅读(34) 评论(0) 推荐(0) 编辑
摘要: https://www.runoob.com/python/python-func-isinstance.html 应用场景: 爬虫进行数据采集时,去除不适合的内容。 例如 for tr in soup.find('tbody').children: if isinstance(tr, bs4.el 阅读全文
posted @ 2022-05-19 16:57 孤舟浮岸 阅读(27) 评论(0) 推荐(0) 编辑
摘要: HTML hyper text markup language。超文本标记语言。是WWW的信息组织方式,能将声音、图像、视频等超文本信息嵌入到文本中。 HTML通过预定义的<>...</>标签形式组织不同类型的信息。 信息标记的三种形式 XML eXtensible Markup Language。 阅读全文
posted @ 2022-05-19 10:51 孤舟浮岸 阅读(53) 评论(0) 推荐(0) 编辑