Leading zeros are octal. I assume that you are converting the string "000000013" and not the literal 000000013, so you should be able to convert them from base 10 integer to int("000000013",10)
If "harm has already been done", and they are literals that have already been converted to octal literals, you can use the following (beware, this is harmful and heresy :)
int(("%o" % 00000013),10)
source share