摘要:
1.请用requests库的get()函数访问网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。 Python代码: 1 import requests 2 3 url = "https://www.baidu.com/" 4 5 for i 阅读全文
posted @ 2023-12-19 18:49
事事顺心ouo
阅读(42)
评论(0)
推荐(0)
摘要:
1 import jieba 2 3 txt = open("D:\Python project\Python123作业\西游记.txt", "r", encoding='utf-8').read() 4 words = jieba.lcut(txt) # 使用精确模式对文本进行分词 5 count 阅读全文
posted @ 2023-12-19 18:30
事事顺心ouo
阅读(87)
评论(0)
推荐(0)
浙公网安备 33010602011771号