自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 快慢指针(LeetCode 142 Linked List Cycle II)

142. Linked List Cycle II题目描述:Given a linked list, return the node where the cycle begins. If there is no cycle, return null.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next

2021-03-23 19:27:38 151

原创 if _name_=='_main_'

if __name__=='__main__':的用法_name_ 是个什么__name__相当于标识当前模块名的变量。如果该模块不是被调用模块,则 __name__=‘__main__如果该模块是被导入的,即import进来的,则__name__=‘模块的名称’。例如:有两个.py文件,一个为sum.py,用于求两数之和的函数,另一个为calculate.py,用于调用sum.py中的...

2020-04-14 16:54:31 249

原创 爬虫爬取网页错误:UnicodeEncodeError: 'gbk' codec can't encode character '\xe7' in position 318

在爬虫爬取网页的html源码写入文件import requests# 定义get请求url = 'https://www.baidu.com/'# 发起get请求res = requests.get(url=url)# 获取响应代码code = res.status_codeprint(code)# 响应成功后把网页内容写入文件中if code == 200: ...

2020-03-07 15:21:52 1975 1

原创 《Python3网络爬虫开发实战》tornado验证程序错误

书中验证代码:import tornado.ioloopimport tornado.webclass MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world")def make_app(): return tornado.web.Applicati...

2020-03-05 22:34:21 529

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除