"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
On Tue, 20 Mar 2007 13:01:36 +0100, Bruno Desthuilliers wrote:
8< --- confusion about left and right
It gets worse.
When you work on a lathe,
a "right hand cutting tool"
has its cutting edge
on the left...
And the worse part is th
That's pretty funny :)
On 3/20/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
On Tue, 20 Mar 2007 13:01:36 +0100, Bruno Desthuilliers wrote:
> Steven D'Aprano a écrit :
>> On Mon, 19 Mar 2007 13:11:09 +0100, Bruno Desthuilliers wrote:
>>
>>> There's no "cast" in Python. It would make no sens i
On Tue, 20 Mar 2007 13:01:36 +0100, Bruno Desthuilliers wrote:
> Steven D'Aprano a écrit :
>> On Mon, 19 Mar 2007 13:11:09 +0100, Bruno Desthuilliers wrote:
>>
>>> There's no "cast" in Python. It would make no sens in a dynamically
>>> typed language, where type informations belong to the LHS of
Steven D'Aprano a écrit :
> On Mon, 19 Mar 2007 13:11:09 +0100, Bruno Desthuilliers wrote:
>
>> There's no "cast" in Python. It would make no sens in a dynamically
>> typed language, where type informations belong to the LHS of a binding,
>> not the RHS.
>
> Surely you have left and right mixed
On Mon, 19 Mar 2007 13:11:09 +0100, Bruno Desthuilliers wrote:
> There's no "cast" in Python. It would make no sens in a dynamically
> typed language, where type informations belong to the LHS of a binding,
> not the RHS.
Surely you have left and right mixed up?
x = 1
x = None
x = "spam"
x = [
On Mar 19, 8:11 am, Bruno Desthuilliers wrote:
> Hitesh a écrit :
>
> > On Mar 18, 12:28 am, "Hitesh" <[EMAIL PROTECTED]> wrote:
> >> Hi,
>
> >> I've a list like this..
> >> str1 = ['this is a test string inside list']
>
> >> I am doing it this way.
>
> >> for s in str1:
> >> temp_s = s
> >>
Hitesh a écrit :
> On Mar 18, 12:28 am, "Hitesh" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I've a list like this..
>> str1 = ['this is a test string inside list']
>>
>> I am doing it this way.
>>
>> for s in str1:
>> temp_s = s
>> print temp_s
Why this useless temp_s var ?
>>
>> Any better
On Sat, 17 Mar 2007 21:28:56 -0700, Hitesh wrote:
>
> Hi,
>
> I've a list like this..
> str1 = ['this is a test string inside list']
That's a bad name for the variable. It's called "str1" but it is a list.
> I am doing it this way.
>
> for s in str1:
> temp_s = s
> print temp_s
That
On Mar 18, 12:28 am, "Hitesh" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've a list like this..
> str1 = ['this is a test string inside list']
>
> I am doing it this way.
>
> for s in str1:
> temp_s = s
> print temp_s
>
> Any better suggestions?
>
> Thank you,
> hj
I want to cast value of a lis
Hi,
I've a list like this..
str1 = ['this is a test string inside list']
I am doing it this way.
for s in str1:
temp_s = s
print temp_s
Any better suggestions?
Thank you,
hj
--
http://mail.python.org/mailman/listinfo/python-list
Thank you very much. I memoed all you views.
:)
--
http://mail.python.org/mailman/listinfo/python-list
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
>
> thanks
Just to be different from the other suggestions...
>>> a = [1, 2, 3]
>>> str(a[1:]).strip('[]'
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
http://effbot.org/zone/python-list.htm#printing
--
http://mail.python.org/mailman/listinfo/python-l
Jia Lu wrote:
> Hi all
>
> I have a list like:
>
list
> [1, 2, 3]
list[1:]
> [2, 3]
>
> I want to get a string "2 3"
>
str(list[1:])
> '[2, 3]'
>
> How can I do that ?
>
" ".join(str(x) for x in list)
-Travis
--
http://mail.python.org/mailman/listinfo/python-list
On 18 Oct 2006 00:20:50 -0700, Jia Lu <[EMAIL PROTECTED]> wrote:
> I want to get a string "2 3"
>
> >>> str(list[1:])
> '[2, 3]'
>
> How can I do that ?
' '.join(str(i) for i in list[1:])
-- Theerasak
--
http://mail.python.org/mailman/listinfo/python-list
Hi all
I have a list like:
>>> list
[1, 2, 3]
>>> list[1:]
[2, 3]
I want to get a string "2 3"
>>> str(list[1:])
'[2, 3]'
How can I do that ?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo