"Patrick" <[email protected]> wrote

Is there an easy way to dictate how many digits a number will occupy
that also allows for leading zeros?

Andre showed you the way to do this using "String Formatting".
Search for that phrase in the docs for al lot more info.

If you are considering using Python v3 then that style is deprecated and
you may want to use the new String Formatter object. See the Python 3
string docs for more on that.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to