I recently needed leading zeros for layer names. Replaced a kludge method with a single line of Python. It determines the number of zeros by the length of the zFill ‘L’ input.
zfill_2024Aug28a.gh (7.2 KB)
a = N.zfill(len(L))
2 months later
P.S. If I understand @Volker_Rakow’s code correctly, it could be added like this: