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

Gerard Brunick gbrunick at andrew.cmu.edu
Thu Oct 18 21:21:41 CEST 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