[Tutor] Help

Remco Gerlich scarblac@pino.selwerd.nl
Sun, 9 Jul 2000 01:13:26 +0200

On Sat, Jul 08, 2000 at 06:08:17PM -0500, Daniel W Wobker wrote:
> Can someone tell me why I am getting an error on this line of code. The totural says it will work but it dose not on my computer.
> >>> string.strip('str') + 'ing' 
> Traceback(innermost last):
>   File "<interactive input>", line 1, in ?
> NameError: string

You need to do 'import string' first.

You call function 'strip' in module 'string'. To use things in a module, you
always have to import it first.

Remco Gerlich,  scarblac@pino.selwerd.nl