Thursday, 19 September 2013

How to get the o/p in exactly 4 digits in python by adding zeros?

How to get the o/p in exactly 4 digits in python by adding zeros?

I want to print the output in 4 digit For eg : if 16/2, the o/p should be
0008
How can I do it?

No comments:

Post a Comment