How do I print a ‘%’ sign using string formatting? [duplicate]
To print the % sign you need to ‘escape’ it with another % sign: percent = 12 print “Percentage: %s %%\n” % percent # Note the double % sign >>> Percentage: 12 % EDIT Nowadays in python3 a better (and more readable) approach is to use f-strings. Note that other solutions (shown below) do work … Read more