官术网_书友最值得收藏!

Choosing a suitable version

There are currently two common varieties of Python in use. One of them is Python version 2.7, which is the final version of the Python 2 series. The Python community has promised to maintain version 2.7 independently, making it a very stable target for development. The other common version is Python 3, which at the time of writing this book is in version 3.6.

Python 3 is where the Python community is innovating. The releases are always backward compatible with earlier version 3 releases, but new exciting features are added regularly. During the change to version 3, the language in the libraries was changed in subtle ways, as you can see in the comparison of the following two code snippets:

In the preceding screenshot, on the left-hand side is Python 2 and on the right-hand side you see an equivalent code in Python 3. They are almost the same, but have differences, such as placement of parentheses, a few keywords, and a slightly different structure than the standard library. You're free to pick whichever version or versions you want for your own projects, but for this book, we'll be using Python version 3.

Now that we have picked the version, let's install it.

主站蜘蛛池模板: 安西县| 富阳市| 浙江省| 金川县| 西充县| 陆良县| 璧山县| 鹿邑县| 汾西县| 凤冈县| 湖南省| 北宁市| 台中市| 错那县| 扎鲁特旗| 腾冲县| 海林市| 土默特左旗| 固镇县| 宜章县| 洛浦县| 溧水县| 偃师市| 井研县| 巴彦淖尔市| 平武县| 高台县| 临漳县| 都安| 青海省| 社会| 石家庄市| 井研县| 新龙县| 马山县| 婺源县| 封丘县| 永兴县| 怀宁县| 卢龙县| 南开区|