![](https://img-blog.csdnimg.cn/20190927151117521.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python
十二分热爱
这个作者很懒,什么都没留下…
展开
-
Variables
language = "python "; language = language.rsplit(); print(language); #rsplit() 右空格 #lsplit() 左空格 #split() 左右两边空格 age = 23 #message = "我的年龄是"+age #TypeError: can only concatenate str (not "int") to str message = "我的年龄是"+str(age) print(message) ...原创 2020-05-23 12:04:07 · 321 阅读 · 0 评论 -
Requests库
通用框架 import requests def getHTMLText(url): try: r=requests.get(url, timeout=30) r.raise_for_status()#如果状态不是200,引发HTTPError异常 r.encoding=r.apparent_encoding retu...原创 2019-04-05 11:07:10 · 84 阅读 · 0 评论