Re: List to string

2007-03-20 Thread Hendrik van Rooyen
"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

Re: List to string

2007-03-20 Thread Josh Bloom
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

Re: List to string

2007-03-20 Thread Steven D'Aprano
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

Re: List to string

2007-03-20 Thread Bruno Desthuilliers
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

Re: List to string

2007-03-19 Thread Steven D'Aprano
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 = [

Re: List to string

2007-03-19 Thread Hitesh
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 > >>

Re: List to string

2007-03-19 Thread Bruno Desthuilliers
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

Re: List to string

2007-03-17 Thread Steven D'Aprano
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

Re: List to string

2007-03-17 Thread Hitesh
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