Re: [Tutor] How to print a %-sign

2007-10-20 Thread Kent Johnson
Leon Hasbeck wrote: > Hi, > > I would like to give out a formatted string that includes a percent sign, > that > is not used as formatting sign.Example: > > print "Your chance to win is %4.2f %" %p Just double the %: print "Your chance to win is %4.2f %%" %p Kent > > This doesn't work, beca

[Tutor] How to print a %-sign

2007-10-20 Thread Leon Hasbeck
Hi, I would like to give out a formatted string that includes a percent sign, that is not used as formatting sign.Example: print "Your chance to win is %4.2f %" %p This doesn't work, because the last %-sign is interpreted as formatting sign and thus leads to an error message. I tried \x25 in