List creat sublists

HI,
I have List, I need according List 1A and 2A creat sublists, but I don’t know how to do it. Please help me,Thanks.


Hello,
here is a possible way

block code:

a;
s=[];
K=DSCore.List.Count(a);
res=[Imperative]
{
for (i in 0..(K-1))
{
if (a[i]=="1A"||a[i]=="2A")
{
s[i]=[a[i]];
}
else
{
s[i]=a[i];
}
}
return  s;
};

Cordially
christian.stan

I appreciate christian.stan,you inspire me!

1 Like