阅读背景:

python如果想输出原格式的内容,可以加''' ''',占位符使用方式

来源:互联网 
print('我考了%d分'%20)
msg='''
---------info of %s-----------
name: %s
age: %d                           #字符串不能放到%d处
job: %s
salary: %f
you will be retired in %s years   #数字可以放到%s处
---------end---------------

---------info of



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: