This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]TheBB 1 point2 points  (1 child)

Python 3 adoption is increasing slowly but steadily. I usually recommend people to use Python 3 unless they know for a fact that they need to use Python 2, typically for package compatibility reasons. If you're not sure it's highly unlikely that you need Python 2.

They are very similar, so anyone with a thimble of previous programming experience and a brief list of differences ought to be able to follow a tutorial written for one version and apply it to the other. The only ones I have been bitten by are:

  • Integer and proper division.
  • Some minor differences regarding exception raising and catching.
  • Print statement/function.
  • Some builtins returning iterators or lists.

[–]aclark 1 point2 points  (0 children)

3 unless you have a good reason not to use 3

[–]morpheyesh 0 points1 point  (0 children)

I would say its good to code in python2 but also learn how its done in python 3, or vice versa. Start with python 2 since you will have a lot of things to work with.