Suppose we have a list of numbers. For example,
A={1231,1232,1233,1241,1236}
Using a function f[x,A]
, I want to rearrange this list into a group of lists that contain the first digits (for x=1
)
f[1,A]={1,2,3,1,6}
The first and second digits (for x=2
)
f[2,A]={31,32,33,41,36}
The first, second, third digits (for x=3
) and continuing until we cover the value in the original list with the most digits (x=Max@@ IntegerLength/@A
).
(If there are zeros in the first digit, i.e 01
then the zeros must be ignored i.e 1
).
How do we proceed?