Feb-07-2019, 01:08 AM
(Feb-06-2019, 09:25 PM)jmair Wrote: I'm just looking for a way to count 001, 002 - 999.Use string formatting
f-string
is what you should use need 3.6+,version before that use format()
. for i in range(1,21): print(f"{i:03}")
Output:001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020