What version of Python should I use if I'm a new to Python?

前端 未结 8 1542
广开言路
广开言路 2020-12-01 20:50

If I\'m absolutely new to Python and am literally reading about printing statements to console, variable types, collections, etc:

What version of Pyth

相关标签:
8条回答
  • 2020-12-01 21:13

    Python 2.6 (and 2.5, 2.4) are what you will find installed on most machines (Linux) and what you will find most code written in. Therefore I'd start with Python 2.6.

    0 讨论(0)
  • 2020-12-01 21:19
    1. Python 3 without any doubt. Today (1 Jan, 2020), the official support for Python 2.7 ends completely - https://github.com/python/devguide/pull/344.

    2. Some major open source projects have committed to stop support Python 2 soon - https://python3statement.org/

    3. If you have some Python 2 code which you want to run with Python 3, here is an official guide - https://docs.python.org/3/howto/pyporting.html

    4. Start with the latest version of Python 3 (currently 3.8.1). Python 3 isn't backward-compatible with Python 2 on purpose because it implements a whole set of new features and clears up the clutter in Python 2 which wasn't really adding anything to the language - https://docs.python.org/release/3.8.1/whatsnew/3.0.html

    0 讨论(0)
  • 2020-12-01 21:20

    Start with Python3. See http://diveintopython3.org/ for a great introduction.

    0 讨论(0)
  • 2020-12-01 21:24

    Directly from python.org:

    If you don't know which version to use, start with Python 2.6.4; more existing third party software is compatible with Python 2 than Python 3 right now.

    If Guido is recommending it, I'd follow him :)

    0 讨论(0)
  • 2020-12-01 21:29

    The latest 2.6. Don't worry about 3.x; there isn't that much to learn.

    0 讨论(0)
  • 2020-12-01 21:30

    one thread in SO you can take reference. Search SO for more if you have to.

    I wouldn't worry too much on function differences. What's more important right now is to learn the language well. Read the documents on Python 3.0 and what's new in its features. When you know what's new, you will know what to do later on if you require to program in Python 3.0. For 2.6 (not sure about 2.5) , if you require the new print functionality, you can always do from __future__ import print

    0 讨论(0)
提交回复
热议问题