python string add character at front code example Example: python insert text at beginning of string m = 1 n = 2 yourstring = ("L" * m) + yourstring + ("L" * n)