wdx1992828 发表于 2017-4-21 09:58:56

【Python】Python 百分号 % 的意思

Python 百分号 % 的意思?
  python教程中看到的一个例子:

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


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

建议你看看书,随便哪一本全面点的书上都有讲到的。
页: [1]
查看完整版本: 【Python】Python 百分号 % 的意思