Putting 0 before 1


#1

Hey guys, i was wondering if it is possible to manipulate this list, so that the numbers would be:
01,02,03,04,05,06,07,08,09,10?

I was thinking of string insert, but the problem is that i only wanna put in the 0 in front of the 9 first numbers, so that i all the way trough the list has two digits.

Capture


#2

using python zfill method:

Capture

input = IN[0]
OUT = [str(i).zfill(2) for i in input]

#3

You are using actual numbers , so not possible if you convert to strings you can use String.PadLeft.


#4

Marcel, i realised that just after i posted :slight_smile: That is one way to do it as you show. But the Python code i was provided is next level :slight_smile: Thx so much


#5

Simple solution, works like a charm, thx so much