Get number from input string

Hi everyone
I have list number be separated by dấu + *
I want to result like picture
I have used list.split separated + * but it was not allowed for results
Can you for me solution?

Have you tried splitting twice? You can then selectively repeat the items in the final list if the final list’s length is bigger than 1:

2 Likes

5 posts were split to a new topic: Format list based on string

@Dimitar_Venkov Nice! Maybe just a String.ToNumber at the end as @Bach was after numbers

Thanks so much @Dimitar_Venkov @salvatoredragotta @saju_autodesk
It’s perfect

1 Like

Dear @Dimitar_Venkov
I have solution!
You can help this add 1 question
Can you change code block x==1 ? 1 : y to node normal, i do not understand more it
Thank!

That’s the short-hand design script syntax for an IF node:

1 Like

@Bach for variety…


strNum.dyn (8.7 KB)

2 Likes

Hi. Also using a simple python script for operation on list could be a valid alternative…

2 Likes

Very thank @Dimitar_Venkov @Vikram_Subbaiah @m.ravelli
It’s perfect

1 Like