# Applying PaddedForm to each element of any list with different dimentions

I have a set of lists in any iteration

list[1]={{0.129627, 0.74633, 0.93636, 0.328093, 0.323795},{0.24651, 0.15002, 0.341932, 0.0734819, 0.596785}, {0.381849, 0.798165, 0.847398, 0.619787, 0.663031}};

list[2]={{0.577629, 0.756704, 0.330815, 0.873377, 0.268678},{0.0456685, 0.320828, 0.541756, 0.116326, 0.683982}};

list[3]={{0.7495, 0.513172, 0.882195, 0.184402, 0.442981}};


As it can be seen the Dimensions of every list is different from another. But I wish to apply the PaddedForm[#,{2,3}] to each number contained in a list. The desired results must be for example:

list[1]={{0.130, 0.750, 0.940, ...},{0.250, .....}, {0.390,....}};
.etc


I tried PaddedForm[#,{2,3}]&list[1] but it does not work. As long as I am not sure to use Map or Mapthread because in each iteration, the Dimension of the list is changing!

• You can Map at {-1} level, check 3rd argument of Map. Or create Listable function.
– Kuba
Jun 22, 2017 at 10:53
• btw, PaddedForm will work applied globally too, you just forgot @, check: PaddedForm[#, {2, 3}] &@list[1]
– Kuba
Jun 22, 2017 at 11:03
• I could understand what you mean Jun 22, 2017 at 11:03
• Is there any way to not have a number as 0.000? because for another list which is not written here I have 0.000 after applying that. For a number that results in as 0.000 it should be written 0. Jun 22, 2017 at 11:06
• You can use If. or replace 0 with "0" before PaddedForm
– Kuba
Jun 22, 2017 at 11:09

PaddedForm maps automatically:
PaddedForm[list[1], {2, 3}] // TableForm

PaddedForm[{list[1], list[2], list[3]}, {2, 3}] //TableForm