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

Gerard Brunick gbrunick at andrew.cmu.edu
Thu Oct 18 15:21:41 EDT 2007


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



More information about the Python-list mailing list