Python strings have a method called zfill that allows to pad a numeric string with zeros to the left.
zfill
In : str(190).zfill(8) Out: \'00000190\' <
Hint: The string can be inverted twice: before and after using the zfill method:
In : acc = '991000' In : acc[::-1].zfill(9)[::-1] Out: '991000000'
Or even more easier:
In : acc.ljust(9, '0') Out: '991000000'