Here's why it doesn't work. (Rather than solving your method which is a pretty inefficient one, as others have shown.)

When you .insert() something into your list, every element gets shifted forward a position to make room.

The indexes you calculated earlier with range(3, len(l_string), 4) are then no longer what you want them to be.

inserting period after every 3 chars in a string
Say I have a field that contains data that is sensitive to errors like telling the difference between an I and l. That's I and l, which may appear identical depending on the font your browser is using. 0 and O (0 and O) is another common example of characters than can be difficult to distinguish.

If I show this field on a standard page layout users won't be able to easily pick the differences between the characters. The default font-family for a dataCol td is Arial, Helvetica, sans-serif.

How can I change the font-family for this field in a standard layout?

If I was using this field in a Visualforce page in an apex:outputText I could use the style attribute to change the font-family.
