Join strings - very simple Q.
Paulo da Silva
psdasilvaX at esotericaX.ptX
Sun Mar 25 20:31:46 CEST 2007
John Machin escreveu:
> On Mar 25, 12:32 am, Paulo da Silva <psdasil... at esotericaX.ptX> 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 the string module but not
> find out about str method
This is a nice argument for perhaps a politician ...
I am not exactly a newbie if you talk about the time I have
been using Python but I have used it very few times and
sparsely in time. I have always used 'string' to do the
strings stuff. When I need a method, I just search the python
library manual index. Then I have a page with all string methods
available. This is why I knew 'string' and didn't know str.
> [e.g. it's easy to miss the one line in the
> "official" Python tutorial that refers to them] (3) why you were not
> using obvious(?) methods to find out for yourself -- much faster than
> posing a question on the newsgroup, and you don't have to face the
> possibility of an impertinent response :-)
That's the kind of answer I hate. Of course anyone could find an
answer to any questions without posting them to this NG.
Google, Python inumerous manuals, books, etc. So, why the NG existence?
The reason we post here is because sometimes it is easier,
or we wait for any further discussion on the subject or just
because we want it.
There are lots of people in this NG with different levels of
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 to the common people :-) . If not, just close your eyes
and let others respond. If the question does not deserve any response,
then the people will judge and will leave it unanswered.
> you could try:
> (1) going to the docs page on the Python website (http://
> www.python.org/doc/), click on the "Search" link about one-third down
> the page, and search for "join". You would get 6 results, one of which
> is "join() (string method)"
This, together with the answer other people here gave, is helpful.
When I posted I thought the subjec was new, do you remember?
> (3) Use Google groups, go to comp.lang.python, type "join string" into
> the search box, and click on "Search this group". First result is the
> current thread; most (or maybe all) of the next six or so will give
> you the syntax your were looking for.
> (4) Using Google or any other reasonable web searcher, search for the
> 3 words: Python join string. Any one of the first few hits gives the
> answer you were seeking.
Yes, and also, as last resource, I could always consult an oracle
somewhere in the ancient Greece, came back and unsubscribe this NG. :-)
You could just type ",".join(L).
Look at the time we are loosing!
More information about the Python-list