What would be the best way to increment a value that contains leading zeroes? For example, I\'d like to increment \"00000001\". However, it should be noted that the number of
Use the much overlooked str.zfill():
str(int(x) + 1).zfill(len(x))