标签:print
【Python】print 常用格式化输出
一:常用字符串格式化符号
1:%c 格式化单个字符或其ASCII码
[crayon-628d60ad5e5c3736284834/]
2:%s 格式化字符串
[crayon-628d60ad5e5cf599378305/]
3:%d 格式化整数
[crayon-628d60ad5e5d5847733403/]
4:%f 格式化浮点数...
【Python】print()
3.6.4官方文档如下:
print(objects, sep=' ', end='\n', file=sys.stdout, flush=False)
print所有的参数均为可选项,我们最常用的方式为(以hello world为例,sep,end,file,flush均采用默认值)
[crayon-628d60ad61bfd552023...