[Chicago] constant length string manipulation
Carl Karsten
carl at personnelware.com
Sun Dec 2 06:29:45 CET 2007
string concatenation is icky.
you have too many 5s.
the line is too long.
your variables are too short.
there are no comments.
and it isn't OOP.
Carl K
Massimo Di Pierro wrote:
> what's wrong with
>
> b=(a[:5]+' ')[:5]
>
> Massimo
>
> On Nov 30, 2007, at 9:25 AM, Lukasz Szybalski wrote:
>
>> On Nov 29, 2007 3:29 PM, Cosmin Stejerean <cstejerean at gmail.com>
>> wrote:
>>> b.ljust(5)[:5]
>> a='1234567890' or a='123'
>> b=a.ljust(5)[:5]
>>
>> so I guess ljust will do.
>> Thanks.
>> Lucas
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> http://mail.python.org/mailman/listinfo/chicago
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
More information about the Chicago
mailing list