%‘I have bought %d pencils' % 45如果使用了多个格式化符,则第二个参数须为元组形式'I bought %d pens and %d pencils yesterday' % (3,45)