[Tutor] newbie question 2

Joseph J. Strout joe@strout.net
Tue, 16 Nov 1999 14:44:39 -0800


At 5:33 PM -0500 11/16/99, Kevin Liang wrote:
>def numwords(s):
>     list = string.split(s)
>     return len(list)
>
>What does the (s) mean ?

It's the parameter to the "string.split" function.

You need to go through the tutorial:
	  http://www.python.org/doc/current/tut/tut.html

If you're at a point where you can't recognize a parameter to a 
function -- and possibly don't even know what parameters and 
functions are -- then going through the tutorial, page by page (which 
will only take an hour or so) will save you many weeks of 
bewilderment.

>Also, I was thinking of getting the book Learning Python , the one 
>by O'Reily et al , and has the big rat/mouse on the cover..anyone 
>recommend it ?  It had a good review in linux journal

I've never read it, but it might be a good idea.  Start with the 
tutorial in any case; it's very good.

Cheers,
-- Joe

,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe@strout.net             http://www.strout.net              |
`------------------------------------------------------------------'