【Python】Python 百分号 % 的意思

 

Python 百分号 % 的意思?

python教程中看到的一个例子:

zip_command = "gzip '%s' %s" % (target, ' '.join(source))

 

前两个%s是占位符,而后面的%是字符替换的意思。

建议你看看书,随便哪一本全面点的书上都有讲到的。

你可能感兴趣的:(【Python】Python 百分号 % 的意思)