I am new and trying to find a way to insert a number of L\'s at the beginning and end of a string. So if I have a string which says
\"where did I put my cupcake thi
For completeness along with the other answers:
yourstring = "L%sLL" % yourstring
Or, more forward compatible with Python 3.x:
yourstring = "L{0}LL".format(yourstring)