list unpack trick?
Nick Coghlan
ncoghlan at iinet.net.au
Sun Jan 23 00:43:43 EST 2005
aurora wrote:
> I am think more in the line of string.ljust(). So if we have a
> list.ljust(length, filler), we can do something like
>
> name, value = s.split('=',1).ljust(2,'')
Eh?
Py> s.split('=',1).ljust(2,'')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'list' object has no attribute 'ljust'
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-list
mailing list