Things to pay attention to when converting python2 to python3

1. The print statement ==> print() function, that is, parentheses need to be added after print.

2. range() will return a list, xrange() will generate a generator object ==> range() will generate a generator object.

3. unicode() ==> str() solves the problem that the unicode() function in python2 reports an error in python3 Develop Paper

Guess you like

Origin blog.csdn.net/m0_46829545/article/details/131058186