Hi Steve,
Here is the python documentation. Hopefully it is a *little* clearer
http://docs.python.org/lib/bltin-file-objects.html
*** readlines ***
readlines( [sizehint])
Read until EOF using readline() and return a list containing the lines thus
read. If the optional sizehint argument
you can do...
word, hint = random.choice(WORDS)
>>> WORDS=( ("python","The python hint"),("program","The program hint"),
("code","The code hint") )
>>> word, hint = random.choice(WORDS)
>>> word
'code
little better if you could reassure me that I am
right, and would sleep even better if you could give me a method to test
this. This kinda stuff looks tricky to test with standard unittest
methodology
Thanks again for the enligntenment all you guys bring to this awesome
language
x27;t hear from me in a while, I've probably suffered a caffeine
overdose.
Thanks for the inspiration,
Todd Maynard
--
The tao that can be tar(1)ed
is not the entire Tao.
The path that can be specified
is not the Full Path.
We declare the names
of all variables and functions.
Yet the
John,
Just as an FYI, Dive into Python is available in printed form. The
http://diveintopython.org website has a link to it on Amazon.com. It might be
cheaper than printing it out yourself..
--Todd Maynard
--
The world is coming to an end ... SAVE YOUR BUFFERS!!!
On Saturday 18
;_t=21550&_r=endtext&_m=EXT
>
> ___
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
Have some fun with itat least until you win the lottery.
--Todd Maynard
--
Computers are unreliable, but humans are even more unreliable.
Any system which depends on human reliability is unreliable.
-- Gilb
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
and for a belated footnote:
[1] = http://www.python.org/peps/pep-0008.html
Style Guide for python code.
--Todd
On Sunday 19 February 2006 06:27, Todd Maynard wrote:
> Nice Job John. I made a few comments below on a few things I noticed.
>
> On Sunday 19 February 2006 05:33, Joh