1.python2.x print "Hello"
python 3.x print("Hello")
2.老版本 except Exception,e
python 2.6之後 except Exception as e
3. python3.3,urllib.request代替urllib2
4.urllib.urlencode -----> urllib.parse.urlencode
5.TypeError:POST data should be bytes or an iterable of bytes.It cannot be of type str.
urllib.parse.urlencode(data)--->urllib.parse.urlencode(data).encode(encoding='UTF-8')
6.if isinstance(api,unicode) ---> if isinstance(api,str)
python3中,unicode函數已改成str函數
7.TypeError:Type str doesn't support the buffer API
python2.x urllib.quote(text) ---->python 3.x urllib.parse.quote(text)
8.Python 2.x中的"httplib"模塊在Python 3.x中變成了"http.client"