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

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.

主站蜘蛛池模板: 沙坪坝区| 灌阳县| 晋中市| 翁牛特旗| 金秀| 肥城市| 石河子市| 邯郸市| 新蔡县| 东光县| 鸡泽县| 金溪县| 中西区| 神农架林区| 万山特区| 乐昌市| 库车县| 信阳市| 贺兰县| 甘南县| 桐梓县| 商城县| 乃东县| 历史| 蛟河市| 开封县| 濮阳县| 施甸县| 瓦房店市| 嘉定区| 芮城县| 保定市| 图片| 兰州市| 兴化市| 玛多县| 于都县| 航空| 舒城县| 纳雍县| 大石桥市|