Opposite of split
Alex van der Spek
zdoor at xs4all.nl
Mon Aug 16 12:44:08 EDT 2010
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 doing
homework for me, so be it.
The fact is that I do try to learn Python. It can do things I thought
required much more coding. Look at the attached. It builds a concordance
table first. That was an excercise from a book on Pascal programming. In
Pascal the solution is 2 pages of code. In Python it is 8 lines. Beautiful!
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 happen unreal world problems?
Regards,
Alex van der Spek
"D'Arcy J.M. Cain" <darcy at druid.net> wrote in message
news:mailman.2159.1281917130.1673.python-list at python.org...
> On 15 Aug 2010 23:33:10 GMT
> Steven D'Aprano <steve at 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 of time because I knew
> that twenty people would jump in with the correct answer because of
> "finally, one that I can answer" syndrome.
>
> --
> D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
> http://www.druid.net/darcy/ | and a sheep voting on
> +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MergeLog2Auto.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20100816/bbf706dc/attachment-0001.ksh>
More information about the Python-list
mailing list