Convert multiline data in single string

I have a set of data as a multiline panel. I hant to create a single string where all the data is written, and with a “\n” character at each original line.
This is needed because i’m trying to use this multiline text file in a optimization tool which is apparently unable to read the multiline data, as it only reads the first line. Therefore the idea of writing the whole data in a single line which contains a character that i can later on use as a separator in a python code directly in the optimization software. (I know that this solution probably isn’t the best, but it’s the only workaround for my problem at the moment). How can I create such thing?

multiline_conversion.gh (16.8 KB)

you can use Text Join component, and a text panel containing a single press of the Enter key as joining fragment