Blender Text field multiple line
import bpy
bpy.ops.object.text_add()
ob = bpy.context.object
ob.data.body = &quot;&quot;&quot;Line1 some text
Line2 more text
Line3 more text&quot;&quot;&quot;

&quot;&quot;&quot; in Python denotes a multiline string. You can also Just use the newline character \n:
ob.data.body = &quot;Line1 some text\nLine2 more text\nLine3 more text&quot;

as well as many other techniques: Pythonic way to create a long multi-line string