哪有什么岁月静好,不过是有人替你负重前行!

11 2021 档案

摘要:test.html代码: <html lang="en"> <head> <meta charset="UTF-8" /> <title>测试bs4</title> </head> <body> <div> <p>百里守约</p> </div> <div class="song"> <p>李清照</ 阅读全文
posted @ 2021-11-29 11:09 longfei825 阅读(54) 评论(0) 推荐(0) 编辑
摘要:#爬取第一页图片 import os import requests from lxml import etree dirName = 'GirLslib' #创建文件夹 if not os.path.exists(dirName): #如果文件夹Girlslib不存在,就创建。 os.mkdir( 阅读全文
posted @ 2021-11-17 11:19 longfei825 阅读(111) 评论(0) 推荐(0) 编辑
摘要:比如这段代码现在出现NameError: name ‘requests’ is not defined from bs4 import BeautifulSoup words = ["旗帜", "计算机", "乾坤", "理工"] for word in words: r = requests.ge 阅读全文
posted @ 2021-11-14 10:14 longfei825 阅读(1641) 评论(0) 推荐(0) 编辑
摘要:极其有可能你把一组dict,用逗号相隔了例如{“id”,id}应该为{“id”:id} 阅读全文
posted @ 2021-11-14 10:06 longfei825 阅读(450) 评论(0) 推荐(0) 编辑
摘要:Jupyter Notebook 有两种键盘输入模式: 1、命令模式,键盘输入运行程序命令;这时的单元框线是蓝色。 2、编辑模式,允许你往单元中键入代码或文本;这时的单元框线是绿色的。 一、命令模式 (在编辑模式下按键 Esc键进入命令模式) 命令模式下jupyter左边为蓝色 命令模式下的快键键: 阅读全文
posted @ 2021-11-13 10:13 longfei825 阅读(114) 评论(0) 推荐(0) 编辑
摘要:always_address =[ ['王*⻰', '北京市海淀区苏州街⼤恒科技⼤厦南座4层'], ['庞*⻜', '北京市昌平区汇德商厦四楼403'], ['顾*锐', '江苏省扬州市三垛镇⼯业集中区扬州市⽴华畜禽有限公司'], ['王*⻜', '上海市徐汇区上海市徐汇区H88越虹⼴场B座5E'] 阅读全文
posted @ 2021-11-10 11:04 longfei825 阅读(820) 评论(0) 推荐(0) 编辑
摘要:import string print(string.ascii_letters) #打印所有大小写字母 print(string.ascii_lowercase) #打印所有小写字母 print(string.ascii_uppercase) #打印所有大写字母 print(string.punc 阅读全文
posted @ 2021-11-02 17:59 longfei825 阅读(136) 评论(0) 推荐(0) 编辑
摘要:for i in range(1,10): for h in range(1,i+1): print('%sx%s='%(h,i),i*h,end=' ') #这段也可以实现:print('{}x{}={}\t'.format(j, i, i*j), end='') print() 执行结果: 1x 阅读全文
posted @ 2021-11-02 17:45 longfei825 阅读(126) 评论(0) 推荐(0) 编辑
摘要:number = 0 while True: number += 1 age = 30 input_age = int(input('请输入你猜的年龄:')) if 150 >= input_age >0: if input_age == age: print('恭喜你,猜对了!') break e 阅读全文
posted @ 2021-11-02 16:58 longfei825 阅读(193) 评论(0) 推荐(0) 编辑
摘要:name = input('name:') age = input('age:') hometown = input('hometown:') hobbie = input('hobbie:') msg = f''' info of {name} Name : {name} Age : {age} 阅读全文
posted @ 2021-11-02 10:42 longfei825 阅读(93) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示