Printing a percent sign
sjmachin at lexicon.net
Tue Sep 26 02:24:53 CEST 2006
stephen at theboulets.net wrote:
> Thanks -- a percent escapes itself when using %-formatting.
> step... at theboulets.net wrote:
> > Hi all. How do I escape the "%" sign in a print statement so that it
> > prints? Thanks.
The following methods of getting answers to problems can be handy if
it's non-peak hours on the net or your internet connection is
1. Reasoning: How do you get a literal "'" into an SQL string constant?
How do you get a literal "\" into a Python string constant? How do you
get a literal "$" into some *x shell command lines? Do you detect a
2. Inspecting the documentation: in this case, it says:
"""% <tab> No argument is converted, results in a "%" character in the
If that is not sufficiently clear, can you suggest how it might be
More information about the Python-list