Python Forum
Poll: Which should I learn first?
You do not have permission to vote in this poll.
2.x
0%
0 0%
3.x
100.00%
8 100.00%
Total 8 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 2.x or Python 3.x
#1
I'm sure this discussion is in here somewhere, but I haven't found it. I'm learning Python and have seen a lot of older discussions about why it's a better idea to start with the 2.x version because of the libraries and documentation available. However 3.x has been out for a while, do you feel it's caught up and I should start with 3.x or stick with 2.x.
I've seen arguments for both, but I also have books written circa 2015 and they were still saying to use 2.7x. Are these old school guys that are just comfortable with how they learned it, or do I get used to print()?

Opinions?
Thanks!
Reply
#2
Hello!
You didn't find such a discussion here because there isn't any. A few years ago - maybe. A huge amount of libraries are ported to version 3 and there is no reason to start with Python 2.x. I did it because of a book I have followed and it did bring me nothing than the basics. If you start with Python now go ahead with Python 3. 2.x is the past, 3 is the future then 4. It's good to know the differences but that's it.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
Well, there I have it. Thanks a lot!
Reply
#4
To find the discussion around here, just wait for a newbie to post code in 2.7. Everyone will immediately chime in telling them they should use 3.6.

I think the question here would be to f-string or not.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
Using 2.x was relevant years ago when 3.x was still new, and didn't have many libraries that supported it.  Now, though, there's only one reason to use 2.x, and that's if you have a legacy codebase you need to support.  If you're new, you should be 3.x 100% of the time.  Any books that teach how to program via 2.x should be used for your backyard compost pile.
Reply
#6
Well, out of the topic I should say that I have used f'strings' only for the last script I wrote. I keep using str.format because I have Ubuntu on the other partition which comes with Python 3.5.2. Also, when I want to share something some people could face some obstacles if I use the new strings.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#7
So I think I'm getting a pretty good general consensus here. ;)
Reply
#8
I don't write code in DiBOL or python 2.7
Reply
#9
(Oct-10-2017, 07:43 PM)nilamo Wrote: Any books that teach how to program via 2.x should be used for your backyard compost pile.

Ha! Well damn you No Starch Press!
Reply
#10
python2.x most likely will not be supported in a couple years
https://pythonclock.org/
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020