Re: Can you escape a % in string that will used for substitution

2007-10-22 Thread Daniel Lenski
On Thu, 18 Oct 2007 15:21:41 -0400, Gerard Brunick wrote: > Is there a way to do: > > s = "I like python %i%s of the time." print s % (99, "%") > > without having to pass in "%"? > > Thanks, > Gerard Just double-up the % sign, e.g. "I like python %i%% of the time." -- http://mail.python.org/m

Re: Can you escape a % in string that will used for substitution

2007-10-18 Thread Tim Chase
> Is there a way to do: > > s = "I like python %i%s of the time." > print s % (99, "%") > > without having to pass in "%"? You mean like s = "I like python %i%% of the time." print s % 99 http://docs.python.org/lib/typesseq-strings.html -tkc -- http://mail.python.org/mailman/listinfo

Can you escape a % in string that will used for substitution

2007-10-18 Thread Gerard Brunick
Is there a way to do: s = "I like python %i%s of the time." print s % (99, "%") without having to pass in "%"? Thanks, Gerard -- http://mail.python.org/mailman/listinfo/python-list