Through the code porting the error to comb!
1. The difference between print functions
In Python 2.x, you can add spaces or parentheses, but Python 3.x can only be parentheses.
# python 2.x>>> print "processing ..." processing...>>> print ("Processing ...") processing...# python 3.x>>> print ("Processing ...") processing ...
2. Raw_input and input functions
Python 2.x raw_input is similar to the input function in Python 3.x, while the input function in Python 2.x receives a number or a quoted string
# Python 2.x>>> a = Raw_input ("value:") value:alex>>> a ' Alex ' >>> b = input ("value:") Value: "A Lex ">>> B ' Alex ' # Python 3.x>>> a = input (" Value: ") value:alex>>> a ' Alex '
Reference: Differences between raw_input () and input () in python2.x and python3.x
3. Tkinter Module
Python 2.x is Tkinter, but Python 3.x is Tkinter (lowercase)
# python 2.x>>> import tkinter# python 3.x>>> import Tkinter
Reference: Python GUI programming (Tkinter)
4. Division operator
Python 2.x in////are all divisible, but Python 3.x in/representation divided by//means divisible
# python 2.x>>> 77/601>>> 77//601# python 3.x>>> 77/601.2833333333333334>>> Int (77 /60) 1>>> 77//601
The difference between "320" Python 2.x and 3.x