Python在字符串种嵌入值怎么实现?
提问人:杨紫红发布时间:2020-11-18
>>> myscore = 1000
>>> message = 'I scored %s points'
>>> print(message % myscore)
I scored 1000 points
>>> nums = 'What did the number %s say to the number %s? Nice belt!!'
>>> print(nums % (0, 8))
What did the number 0 say to the number 8? Nice belt!!
继续查找其他问题的答案?
相关视频回答
回复(0)
点击加载更多评论>>