Http://woodpecker.org.cn/diveintopython3/porting-code-to-python-3-with-2to3.html
Abstrac:
Almost all of the Python 2 programs require some modification to run normally in the Python 3 environment. To simplify the conversion process, Python 3 brings up a utility script called 2to3 (Utility script), which takes your Python 2 program source file as input and automatically converts it to Python 3. Case study: Porting Chardet to Python 3 (porting Chardet to Python 3) describes how to run this script and then shows some cases where it cannot be automatically repaired. This appendix describes the content that it can automatically fix. Print Statement #
In Python 2, print is a statement. Whatever you want to output, just put them behind the print keyword. In Python 3, print () is a function. Like other functions, print () requires you to pass the object you want to output as an argument.