小编use*_*196的帖子

Python字符串格式化特殊字符

你如何使以下代码工作?

example = "%%(test)%" % {'test':'name',}
print example
Run Code Online (Sandbox Code Playgroud)

期望的输出是"%name%"

谢谢

python string-formatting

3
推荐指数
2
解决办法
6772
查看次数

标签 统计

python ×1

string-formatting ×1