Python2
潜水猿
这个作者很懒,什么都没留下…
展开
-
Python2中的urllib2到Python3
本文借鉴自万能网友 https://blog.csdn.net/weixin_42825585/article/details/94856394 urillb2在python3中的变化 在Pytho2.x中使用import urllib2——-对应的,在Python3.x中会使用import urllib.request,urllib.error。 在Pytho2.x中使用import urlli...原创 2020-04-27 15:34:19 · 181 阅读 · 0 评论 -
Python2和Python3中的编码解码
Python2 Python3中的str对象在Python2中叫做Unicode. 而bytes对象在 Python2中叫做str 即:我们通常理解中的str在Python2中使Unicode 而字节型数据在Python2中被定义成了str Python2中的Unicode对象中的decode方法不能使用 Python2中的str对象中的encode方法不能使用. Python2中大量模块的编码方...原创 2020-04-22 16:05:16 · 142 阅读 · 0 评论