Second, the difference py2 and py3

1, the default encoding py2 are ASCII, the default encoding is UTF-8 py3

2, Py2 Print function can be enclosed in quotation marks may be enclosed performed, py3 brackets must be performed

3, py2 interactive function using the raw_input () was str, input () int get the data type, py3 use input () obtained str

4, py2 have range () and xrange () Py3 only range (), it is iterables

5, py2 floating-point division is not only returns the quotient, as divisible. py3 return fractional division, divisible with py2

Guess you like

Origin www.cnblogs.com/wn-888/p/11611180.html