List data management - Join list of strings

Hi there,
I can’t even search for this, let me just ask…
See screen cap, its a list of lists. The sub-lists are made of letters (strings).

I need each sub-list to be simply a string. The string is the concat of all the letters of the sub-string.

The sub-lists could be different lengths…

So for example, index 8 in the screen shot should become “FH”, while 11 would be “CCH”…

Thank you!

13-08-2018-09-29-33

Attach that node to a python node with this:

list = []
for i in IN[0]:
    list.append(''.join(i))
OUT = list

Or save the headache of having to code that python every time you need it and just use the string.join node, with an empty string as the separator.

image

1 Like

Thank you

I often imagine there must be a simple solution to most of my questions, yet, I am always surprised at actually how simple it turns out to be… :frowning:

Will Dynamo ever be learnable?

Thank you again

regards

gio

Dynamo is quite learnable once you crack the apparent logic behind it :slight_smile:

1 Like

@Giovanni_Succi - Have you done the primer, skipping nothing no matter how trivial it looks yet? There are a few examples of this node in use in an early chapter, in almost the same way you’re using it.

http://primer.dynamobim.org/en

If you have, then it may just have been learned and lost due to lack of use. I often find myself going back and finding ‘oh yeah!’ moments and nodes in my own work. The program is just really, really big. As a result ‘knowing’ it all isn’t likely a reasonable expectation, nor is ‘knowing’ every AutoCAD command, or Revit API call. Knowing how to find it is.

I mean even professional athletes train the basics every day so they don’t forget. :slight_smile: