Newbie Question

Mel Brown mel.b at mindspring.com
Mon Oct 8 06:36:37 CEST 2001


"Janos Blazi" <jblazi at hotmail.com> wrote in message > Let us assume, you
want to use the function strip from the string modeul.
> There are three possibilities:
>
> (1)
> >>>import string
> in this case you have to use qualified names:
> >>>s=string.strip(s)
>
> (2)
> >>>from string import split
> then you can omit the "string."-prefix:
> >>>s=strip(s)
> but you have only imported the function strip
>
> (3)
> >>>from string import *
> then you can use +every+ function from string without the "string."-prefix

Thanks. All work.





More information about the Python-list mailing list