Given format % values (where format is a string or Unicode object), % conversion specifications in format are replaced with zero or more elements of values. The effect is similar to the using sprintf() in the C language. If format is a Unicode object, or if any of the objects being converted using the %s conversion are Unicode objects, the result will also be a Unicode object.
这是相似的:What's the difference between %s and %d in Python string formatting?
所以看起来“%”只是告诉python把右边的值放到左边的占位符中。你知道吗
从我引用的答案中链接的文档中:
可能需要设置一个python脚本并进行尝试,将您自己的值放入变量中。你知道吗
在C中,它看起来像:
或:
相关问题 更多 >
编程相关推荐