Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Nate Thomas
Front End Web Development Techdegree Student 1,218 PointsPython 2 vs 3
I was always told if I learn Python I should learn python 2.7 and not 3. The reason being was because you can go from Python 2 to Python 3 very easy. I just want to know if this is true and wondering why Treehouse doesnt teach 2.
1 Answer
Chris Freeman
Treehouse Moderator 68,468 PointsIf one can go from Python 2 to 3 easily, the opposite is true you can go from 3 to 2 just as easily! The current "End of Life" for Python 2 is schedule for 2020. (But this might get extended. Again.)
The only reason to focus on Python 2 is when working with legacy code that has yet to migrate to Python 3, or there is a dependency on a package that doesn't yet support Python 3.
A major resistance of moving to Python 3 used to be the lack of python modules support. A website was created to shame developers to updating their code to run under Python 3 call the Wall of Shame. Once more that 50% of the top Python packages supported Python 3, the name of the page was changed to Wall of Superpowers. Here is another graph of the top 360 package Python 3 status.
There is also a package available called six that helps create code that will run under both Python 2 and 3.