Hi Alex,
On 2010-08-16 18:44, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome. Help me learn, that is one of the objectives of this
newsgroup, right? Or is it all about exchanging the next to impossible
solution to the never to
On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote:
Hi Alex,
On 2010-08-16 18:44, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome. Help me learn, that is one of the objectives of this
newsgroup, right? Or is it all
On 2010-08-17, Neil Cerutti ne...@norwich.edu wrote:
On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote:
Hi Alex,
On 2010-08-16 18:44, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome. Help me learn, that is one of
On 08/17/2010 05:46 PM, Grant Edwards wrote:
On 2010-08-17, Neil Cerutti ne...@norwich.edu wrote:
On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote:
Hi Alex,
On 2010-08-16 18:44, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
Thanks much,
Nope, no homework. This was a serious question from a serious but perhaps
simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
VB(A) and is looking for a replacement of VB and finding that in Python. You
can guess my age now.
Most of my work I do in R
Perhaps the ones here who think I was trying to make you do my homework can
actually help me for real. Since I run my own company (not working for any
of the big ones) I can't afford official training in anything. So I teach
myself, help is always welcome and sought for. If that feels like
On Mon, 16 Aug 2010 18:26:46 +0200
Alex van der Spek zd...@xs4all.nl wrote:
Nope, no homework. This was a serious question from a serious but perhaps
simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
VB(A) and is looking for a replacement of VB and finding that in
On Mon, 16 Aug 2010 18:44:08 +0200
Alex van der Spek zd...@xs4all.nl wrote:
Perhaps the ones here who think I was trying to make you do my homework can
You keep replying to my message but as I pointed out in my previous
message, I'm not the one who thought that you posted a homework
question.
On 8/16/2010 12:44 PM, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome.
1. You don't need to separate out special characters (TABs, NEWLINEs,
etc.) in a string. So:
Looking for a method that does the opposite of 'split', i.e. elements in a
list are automatically concatenated with a user selectable spacer in between
e.g. '\t'. This is to prepare lines to be written to a sequential file by
'write'.
All hints welcome.
Regards,
Alex van der Spek
--
http
On 15.08.2010 20:24, Alex van der Spek wrote:
Looking for a method that does the opposite of 'split', i.e. elements in
a list are automatically concatenated with a user selectable spacer in
between e.g. '\t'.
.join([i,am,a,list])
'i am a list'
Wieland
--
http://mail.python.org/mailman
On 08/15/2010 11:24 AM, Alex van der Spek wrote:
Looking for a method that does the opposite of 'split', i.e. elements
in a list are automatically concatenated with a user selectable spacer
in between e.g. '\t'. This is to prepare lines to be written to a
sequential file by 'write'.
All
On 08/15/2010 11:35 AM, Gary Herron wrote:
On 08/15/2010 11:24 AM, Alex van der Spek wrote:
Looking for a method that does the opposite of 'split', i.e. elements
in a list are automatically concatenated with a user selectable
spacer in between e.g. '\t'. This is to prepare lines to be written
On Sun, 15 Aug 2010 12:10:10 -0700, Steven Howe wrote:
Strings have a join method for this:
'\t'.join(someList)
Gary Herron
or maybe:
-
res =
for item in myList:
res = %s\t%s % ( res, item )
Under what possible circumstances would you
In article 4c687936$0$11100$c3e8...@news.astraweb.com,
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
On Sun, 15 Aug 2010 12:10:10 -0700, Steven Howe wrote:
Strings have a join method for this:
'\t'.join(someList)
Gary Herron
or maybe:
On 15 Aug 2010 23:33:10 GMT
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
Under what possible circumstances would you prefer this code to the built-
in str.join method?
I assumed that it was a trap for someone asking for us to do his
homework. I also thought that it was a waste
On Sun, 15 Aug 2010 19:58:54 -0400, Roy Smith wrote:
Actually,
there is (at least) one situation where this produces the correct
result, can you find it?
When myList is empty, it correctly gives the empty string.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
17 matches
Mail list logo