Request for feedback on my first Python program

Fernando Perez fperez528 at
Mon Jun 2 20:50:05 CEST 2003

Martin Franklin wrote:

> as of Python 2.0 the string module is not needed (string's have methods...)

Not true.  Until strings have _all_ the methods in the strings module, we'll
still need it:

In [8]: import string

In [9]: s='abc'

In [10]: string.zfill(s,9)
Out[10]: '000000abc'

In [11]: s.zfill(9)
AttributeError                            Traceback (most recent call last)


AttributeError: 'str' object has no attribute 'zfill'



More information about the Python-list mailing list