打印百分号 [英] Printing a percent sign
本文介绍了打印百分号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好。如何逃避%在打印声明中签名以便打印出b
?谢谢。
Stephen
Hi all. How do I escape the "%" sign in a print statement so that it
prints? Thanks.
Stephen
推荐答案
在新闻中写道:11 ***** *****************@d34g2000cwd.googlegr oups.com
comp.lang.python:
wrote in news:11**********************@d34g2000cwd.googlegr oups.com in
comp.lang.python:
大家好。如何逃避%在打印声明中签名以便打印出b
?谢谢。
Hi all. How do I escape the "%" sign in a print statement so that it
prints? Thanks.
打印" %%"
Rob。
-
http://www.victim-prime.dsl.pipex。 com /
st*****@theboulets.net 写道:
大家好。如何逃避%在打印声明中签名以便打印出b
?谢谢。
Hi all. How do I escape the "%" sign in a print statement so that it
prints? Thanks.
>> print"%"
>>print "%"
%
您是否在使用%运算符插值的字符串中?
Georg
%
Did you mean in a string being interpolated with the % operator?
Georg
Rob Williscroft在新闻中写道:Xns9849DC7DB4102rtwfreenetREMOVEcouk @
216.196.109.145 in comp。 lang.python:
Rob Williscroft wrote in news:Xns9849DC7DB4102rtwfreenetREMOVEcouk@
216.196.109.145 in comp.lang.python:
在新闻中写道:11 ********************** @ d34g2000cwd。 googlegr oups.com
comp.lang.python:
wrote in news:11**********************@d34g2000cwd.googlegr oups.com in
comp.lang.python:
>大家好。如何逃避%在打印声明中签名以便它打印?谢谢。
>Hi all. How do I escape the "%" sign in a print statement so that it
prints? Thanks.
打印" %%"
print "%%"
好的,对问题的简单性感到困惑。
真正的答案是:
打印"%"
但真实的问题是如何打印%whern做%格式化,
acuracy = 100
print"这是%d %%比我之前的回答 %acuracy
Rob。
-
http://www.victim-prime.dsl.pipex.com/
这篇关于打印百分号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文