Add some text to a text frame:
tframe.parentStory.insertionPoints[-1].contents = " appended text"
For an em-dash use \u2013, as in "high\u2013low".
Your solution worked thanks, but i have some confusion i was trying with the code as
pi.insertionPoints.lastItem().contents = "appended text"
this code was working fine unless i tried to append text in a threaded textframe. In some cases the text was jumbled up depending upon where it was inserted, in some cases some portion of text was inserted in reverse order. Could you explain what was wrong in this code, also what does -1 index in your code stand for.
It will be very nice and helpful of you if you could clear up my confusion.
Why the text you insert was garbled or inserted in reverse order I don't know. I don't see that, even in threaded frames.
insertionPoints[-1] is the equivalent of insertionPoints.lastItem() but it's less typing. On the whole you'd better avoid things like nextItem(), previousItem(), which are terribly slow in longer stories. I don't know about firstItem() and lastItem(), they may not be slower than their equivalents  and [-1], but the latter as simply easier to type.
Text may get inserted in reverse if you add to *frames* instead of to the story, because any new text you add may get pushed immediately to the next frame.
If you want to add text to the "end of a frame", either do so in one chunk, or assemble it into a temporary text frame and when done, move it into a single chunk. But there is nothing you can do to ensure it actually *appears* at the "end of a frame"; if it's full, the text will flow into the next one or get overset.