in reply to Re: weird problem inserting an array into a Tk text widget
in thread weird problem inserting an array into a Tk text widget

Indeed, 1st arg is index where to insert the text, 2nd is text, 3rd is tag, 4th is text 5th is tag - often used for text with non-trivial formatting...

here is an excerpt from tk docs:

pathName insert index chars ?tagList chars tagList ...? Inserts all of the chars arguments just before the character at index. + If index refers to the end of the text (the character after the last + newline) then the new text is inserted just before the last newline +instead. If there is a single chars argument and no tagList, then the + new text will receive any tags that are present on both the characte +r before and the character after the insertion point; if a tag is pre +sent on only one of these characters then it will not be applied to t +he new text. If tagList is specified then it consists of a list of ta +g names; the new characters will receive all of the tags in this list + and no others, regardless of the tags present around the insertion p +oint. If multiple chars-tagList argument pairs are present, they prod +uce the same effect as if a separate pathName insert widget command h +ad been issued for each pair, in order. The last tagList argument may + be omitted.