this is what am trying to do :
l = 4
length = 10**l #10000
for x in xrange(length): 
   password = str(username)+str("%02d"%x) #but here instead of 2 i want it to be l
as you can see i want to control the format string with a variable witch i could do on my own i tried to do it like this :
password = str(username)+str("%0"+str(l)+"d"%x)  
but it gives me an error telling me that : not all arguments converted during string formatting
 
    