1

I have a

list1 = {1, 23, 4, 14} (*max entry is 99*)

and want to create from that another

list2 = {01, 23, 04, 14}

preceding zeros if the number is less than 10.

How can I do that?

David G. Stork
  • 41,180
  • 3
  • 34
  • 96
lio
  • 2,396
  • 13
  • 26

1 Answers1

2
IntegerString[list1, 10, 2]

Note that the resulting list consists of strings and not numbers. But maybe that is sufficient for your application?

Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309