[Tutor] Functions and lists.

Magnus Lycka magnus@thinkware.se
Wed, 14 Aug 2002 03:46:23 +0200


At 16:22 2002-08-13 -0500, SA wrote:
>import string
...
>value =3D string.strip(sys.stdin.readline())

Just a detail: As of Python 2.0 (or 1.6?) we
have string methods, and can type

value =3D sys.stdin.readline().strip()

instead of

import string
value =3D string.strip(sys.stdin.readline())

Unfortunately, most books are still covering 1.5.2...


--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se