[Tutor] Sorting a list in ascending order [RESOLVED]

Alan Gauld alan.gauld at yahoo.co.uk
Fri Apr 29 19:48:36 EDT 2016


On 30/04/16 00:05, Ken G. wrote:

> been able to change over to Python3. I am not together sure if Python3 
> is now more stable to use and more commonly use. 

It is definitely stable and most libraries are now converted (although a
few remain v2 only). Availability of libraries is now the only real
reason to stick with v2 IMHO.

> change over but do realize there is a learning curve to learn. 

The main learning is in the libraries rather than the core language.
Quite a lot of modules got changed/moved/renamed etc. Also the
return values of a lot of functions changed to iterators and the like.
Those are the things that tend to catch you out, not the core language.

> there is a script to translate my Python2 programs to Python3 format. 

Yes there is, although it's not foolproof, you often have to manually
tweak things. It comes with v3 in, I think, the scripts folder.

There is also something called six that you should investigate
if you have a significant amount of v2 code to manage alongside v3.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list