ma = re.match(r'\Aimooc[\w]*','iimoocpython') 這句話里面\A加和不加沒區別,用這里例子來說明\A的作用不合適。差評
2016-06-27
TypeError: cannot use a string pattern on a bytes-like object
python3 以后需要改為
response = urllib.request.urlopen(url)
buf = response.read()
buf = buf.decode('utf-8')
python3 以后需要改為
response = urllib.request.urlopen(url)
buf = response.read()
buf = buf.decode('utf-8')
2016-06-24