python2和python3的区别:

http://www.ttlsa.com/docs/dive-into-python3/porting-code-to-python-3-with-2to3.html