ナンクル力学系

学んだ事を書き連ねていこう。

Python文字列のzerofill

leave a comment »

これだけ:

spam='123'
digit=10
zero_filled_str=spam.zfill(digit)

spam.zerofillじゃないよ!

Advertisements

Written by tkf

October 21, 2008 at 1:47 pm

Posted in programming

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: