Sublists from a irregular list containing: double, int64 and string

Hello there!

I struggle with dividing a list into sublists.The list contain types: doubles&int64+string, which appear in cycle.
Number of double’s and int64s is constant, then comes string types. Strings always begin with the same string. eg:
4 5 6 X y e 1 7 9 X f h g r h

What I want to do is make sublist:
4 5 6 X y e
1 7 9 X f h g r i
8 4 3 X g h f
I separated numbers from strings so far by FilterByBoolMask. And made sublists from numbers:
4 5 6
1 7 9
8 4 3

But now how to separate list of strings: X y e X f h g r i X g h f
I though about Python script that counts X, make that many empty lists, and then fills those lists by strings between X in for loop with if condition… but i bet that can be done with buildin nodes.

Any ideas?

Regards

Did you try the String.Split OOTB node with the separator as “X”?

Hi @MarcinLas

?

2 Likes

That’s bulls eye.

Hahahaha :smiley::laughing::laughing: I like the word bulls eye :laughing:
ForMarcinLas.dyn (2.4 KB)

Please mark the post as solved.

5 Likes

Sure it’s possible
subString.dyn (16.8 KB)

4 Likes