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
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
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
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
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.
You can use sorted(line) but you result will be in a list if thats okay.
Otherwise you can iterate the list.
Sent from my iPhone
> On Apr 29, 2016, at 3:03 PM, Ken G. wrote:
>
> In entering five random number, how can I best sort
> it into ascending order, such as
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
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 =
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.x. You can read more about the
differences
Hi Ken,
As the message clearly says, the string object doesn't have an attribute
"sort". You are trying to join the inputs as a single string,"line" and
then you are trying to sort it. But, as you want the string in the sorted
format, you should sort it first and then convert it into string, as
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"
number04 = "53"
number05 = "44"
line = number01 + number02 + number03 + number04 + number05
print
print
11 matches
Mail list logo