How make loop to append text blocks
Loop over the text blocks, get their texts, append them to a text list, join them as you wish:



To get a list of all text blocks, you can use this piece of code:

[text for text in bpy.data.texts]


Which you can possibly filter in anyway, for instance using the Filter Text Block List: