Read the contents of a Text Datablock
I have never needed to work with text blocks so I have no idea yet. Let's find out.

If you press Tab after writing something in the Python Console, you can see all the available options from auto complete like this:



We can see that it is possible to access lines text.lines so if we want to read the 4th line for example we carry on with auto complete:



and see that it has body, that's probably the thing we need here then:



It's a string. That's it.