Paulo da Silva escreveu:
> John Machin escreveu:
>> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>>> John Machin escreveu:
> ...
...
> knowledge. If you feel that it is a question that deserves the
> honour of your response, just do it. Write it on the stones and
> send them down
En Sun, 25 Mar 2007 15:31:46 -0300, Paulo da Silva
<[EMAIL PROTECTED]> escribió:
> John Machin escreveu:
>> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>>> John Machin escreveu:
>> [e.g. it's easy to miss the one line in the
>> "official" Python tutorial that refers to them]
John Machin escreveu:
> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> John Machin escreveu:
..
> What was not obvious was (1) if you have been using Python for a
> while, how you managed to be unaware of str methods (2) if you are a
> newbie, how you managed to find out about t
Dustan escreveu:
> On Mar 24, 7:16 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> Dustan escreveu:
>>
>>
>>
>>> On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
Mike Kent escreveu:
...
> New way:
> l=['a','b','c']
> jl=','.join(l)
I thank you all.
Almo
On Mar 25, 2007, at 6:33 AM, Dennis Lee Bieber wrote:
> On Sat, 24 Mar 2007 10:53:20 +0200, "Hendrik van Rooyen"
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>>
>> What happened in 1850 to make it the demarcation line?
>>
> Well... The Modified Julian Date zero is 17
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
>
>
> > On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
> >
> > > OK, I'll bite: This was "new" in late 2000 when Python 2.0 was
> > > released. Where have you been in the last ~6.5 years?
> >
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
> On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
>
> > OK, I'll bite: This was "new" in late 2000 when Python 2.0 was
> > released. Where have you been in the last ~6.5 years?
>
> Western civilization is 6,000 years old. Anything after 1850
On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> John Machin escreveu:
> ..
>
>
>
> > Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on
> > win32
> > Type "help", "copyright", "credits" or "license" for more information.
> > | >>> help("".join)
> > Help on built-in f
"7stud" <[EMAIL PROTECTED]> wrote:
> On Mar 24, 8:30 am, Duncan Booth <[EMAIL PROTECTED]>
> wrote:
>> In case you are feeling that the ','.join(l) looks a bit
>> jarring, be aware that there are alternative ways to write it.
>> You can call the method on the class rather than the instance:
>>
>>
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> 7stud schrieb:
>> When I try the latter example, I get an error:
>>
>> lst = ["hello", "world"]
>> print unicode.join(u"\u00d7", lst)
>>
>> Traceback (most recent call last):
>> File "test1.py", line 2, in ?
>> print unicode.join(u"\u00d7", l
7stud schrieb:
> On Mar 24, 8:30 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
>> In case you are feeling that the ','.join(l) looks a bit jarring, be aware
>> that there are alternative ways to write it. You can call the method on the
>> class rather than the instance:
>>
>>jl = str.join(',', l)
On Mar 24, 8:30 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> In case you are feeling that the ','.join(l) looks a bit jarring, be aware
> that there are alternative ways to write it. You can call the method on the
> class rather than the instance:
>
>jl = str.join(',', l)
>jl = unicode.joi
On Mar 24, 7:16 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> Dustan escreveu:
>
>
>
> > On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> >> Mike Kent escreveu:
> >> ...
>
> >>> New way:
> >>> l=['a','b','c']
> >>> jl=','.join(l)
> >> I thank you all.
>
> >> Almost there ...
> >> I
Steven D'Aprano escreveu:
> On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
>
>
> Western civilization is 6,000 years old.
After reading that post I wouldn't talk about
civilization, western or any other :-)
Regards.
Paulo
--
http://mail.python.org/mailman/listinfo/python-list
Dustan escreveu:
> On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> Mike Kent escreveu:
>> ...
>>
>>> New way:
>>> l=['a','b','c']
>>> jl=','.join(l)
>> I thank you all.
>>
>> Almost there ...
>> I tried "".join(l,',') but no success ... :-(
>>
>> Paulo
>
> Perhaps you're doing it
John Machin escreveu:
..
> Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> | >>> help("".join)
> Help on built-in function join:
>
> join(...)
> S.join(sequence) -> string
>
> Return a st
"Dustan" <[EMAIL PROTECTED]> wrote:
> Perhaps you're doing it wrong, despite having an example right in
> front of you?
>
> Side by side comparison:
> jl=string.join(l,',')
> jl=','.join(l)
>
> The sequence is passed as an argument to the join method, and the
> delimiter is the string whose metho
import string
def test_join(l):
print "Joining with commas: ", string.join(l,',')
print "Joining with empty string: ", string.join(l,'')
print "Joining same way, using another syntax: ", ''.join(l)
print "Joining with the letter X: "
On Mar 24, 5:59 am, "Dustan" <[EMAIL PROTECTED]> wrote:
> On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>
> > Mike Kent escreveu:
> > ...
>
> > > New way:
> > > l=['a','b','c']
> > > jl=','.join(l)
>
> > I thank you all.
>
> > Almost there ...
> > I tried "".join(l,',') but no succe
On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> Mike Kent escreveu:
> ...
>
> > New way:
> > l=['a','b','c']
> > jl=','.join(l)
>
> I thank you all.
>
> Almost there ...
> I tried "".join(l,',') but no success ... :-(
>
> Paulo
Perhaps you're doing it wrong, despite having an examp
On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
> OK, I'll bite: This was "new" in late 2000 when Python 2.0 was
> released. Where have you been in the last ~6.5 years?
Western civilization is 6,000 years old. Anything after 1850 is "new".
*wink*
--
Steven.
--
http://mail.python.org
On Mar 24, 5:37 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I was told in this NG that string is obsolet. I should use
> str methods.
>
> So, how do I join a list of strings delimited by a given
> char, let's say ','?
>
> Old way:
>
> l=['a','b','c']
> jl=string.join(l,',')
>
> New way?
Mike Kent escreveu:
...
> New way:
> l=['a','b','c']
> jl=','.join(l)
>
I thank you all.
Almost there ...
I tried "".join(l,',') but no success ... :-(
Paulo
--
http://mail.python.org/mailman/listinfo/python-list
> > I was told in this NG that string is obsolet. I should use
> > str methods.
> >
> > So, how do I join a list of strings delimited by a given
> > char, let's say ','?
> >
> > Old way:
> >
> > l=['a','b','c']
> > jl=string.join(l,',')
> >
> > New way?
>
> Dunno if it's the "new way", but you can
Paul Rudin <[EMAIL PROTECTED]> writes:
> Paulo da Silva <[EMAIL PROTECTED]> writes:
>
>> Hi!
>>
>> I was told in this NG that string is obsolet. I should use
>> str methods.
>>
>> So, how do I join a list of strings delimited by a given
>> char, let's say ','?
>>
>> Old way:
>>
>> l=['a','b','c']
On Mar 23, 2:37 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I was told in this NG that string is obsolet. I should use
> str methods.
>
> So, how do I join a list of strings delimited by a given
> char, let's say ','?
>
> Old way:
>
> l=['a','b','c']
> jl=string.join(l,',')
>
> New way?
Paulo da Silva <[EMAIL PROTECTED]> writes:
> Hi!
>
> I was told in this NG that string is obsolet. I should use
> str methods.
>
> So, how do I join a list of strings delimited by a given
> char, let's say ','?
>
> Old way:
>
> l=['a','b','c']
> jl=string.join(l,',')
>
> New way?
Dunno if it's th
Hi!
I was told in this NG that string is obsolet. I should use
str methods.
So, how do I join a list of strings delimited by a given
char, let's say ','?
Old way:
l=['a','b','c']
jl=string.join(l,',')
New way?
Thanks
Paulo
--
http://mail.python.org/mailman/listinfo/python-list
28 matches
Mail list logo