%
‘I have bought %d pencils' % 45
如果使用了多个格式化符,则第二个参数须为元组形式
'I bought %d pens and %d pencils yesterday' % (3,45)
本文标题:格式化操作符%
本文链接:https://www.haomeiwen.com/subject/vxwcgxtx.html
网友评论