引号无效

问题描述 投票:0回答:1

为什么这个python脚本会抱怨语法?

  File "github-wiki-auditor.py", line 36
    print "[*] Exiting - {0} is not a valid accounts input file.".format(accountsFile)
                                                                ^
SyntaxError: invalid syntax

完整的python脚本。https:/github.comSmeegeSecGitHub-Wiki-Auditorblobmastergithub-wiki-auditor.py

python python-3.x syntax
1个回答
0
投票

你使用的是类似于Python 2.x中的print函数,在Python 3.x中只需做如下操作

print("[*] Exiting - {0} is not a valid accounts input file.".format(accountsFile))
© www.soinside.com 2019 - 2024. All rights reserved.