any function to fill zeros to the right?? zfill??

s0suk3 at gmail.com s0suk3 at gmail.com
Wed Aug 13 20:54:30 EDT 2008


On Aug 13, 7:48 pm, Johnny <Arton0306 at gmail.com> wrote:
> if I want to fill zeros to the right, what function can help??
> ex:
> '1.23'=>'1.2300'
> but '1.23'.zfill(6)=>'001.23'

>>> '1.23'.ljust(6, '0')
'1.2300'

Sebastian




More information about the Python-list mailing list