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

2016-04-30 Thread Steven D'Aprano
On Fri, Apr 29, 2016 at 07:05:27PM -0400, Ken G. wrote: > Martin: I have been using Python2 for several years now and I have yet > been able to change over to Python3. I am not together sure if Python3 > is now more stable to use and more commonly use. If so, I will gradually > change over but

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

2016-04-29 Thread meenu ravi
That's actually two single quotes:-) both single and double quotes should work. Thanks, Meena On Apr 29, 2016 5:58 PM, "Ken G." wrote: > > On Fri, Apr 29, 2016 at 3:01 PM, Ken G. wrote: > >> In entering five random number, how can I best sort >> it into ascending order, such as 0511414453? Usin

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

2016-04-29 Thread Ken G.
On 04/29/2016 07:40 PM, Alan Gauld via Tutor wrote: On 29/04/16 23:58, Ken G. wrote: print ''.join(list1) #making it again as a single string Thanks, Meena, that is great! I changed your last line to: print "".join(list1) and it came out as below: 0511414453 Another quotation

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

2016-04-29 Thread Alan Gauld via Tutor
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 re

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

2016-04-29 Thread Alan Gauld via Tutor
On 29/04/16 23:58, Ken G. wrote: >> print ''.join(list1) #making it again as a single string >> > > Thanks, Meena, that is great! I changed your last line to: > > print "".join(list1) and it came out as below: > > 0511414453 > > Another quotation mark was needed. No it wasn't. Meen

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

2016-04-29 Thread Ken G.
On 04/29/2016 05:10 PM, Martin A. Brown wrote: Greetings Ken and welcome to Python, Using Linux 2.7.6 in Ubuntu 14.04.4. Thanks. Thank you for this information. I have one tip for you: While Python 2.x will still be around for a while, if you are learning Python today, I'd suggest Python 3

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

2016-04-29 Thread Ken G.
On Fri, Apr 29, 2016 at 3:01 PM, Ken G. > wrote: In entering five random number, how can I best sort it into ascending order, such as 0511414453? Using Linux 2.7.6 in Ubuntu 14.04.4. Thanks. number01 = "41" number02 = "11" number03 = "05"