我的python语法有点问题,我似乎无法理解

我的python语法有点问题,我似乎无法理解,python,Python,我正在尝试执行的代码: print "Creating account %s with the password %s" % (username1, password1) 您正在使用Python 3。调用print函数需要括号: print("Creating account %s with the password %s" % (username1, password1)) 看起来您正在使用Python3,所以如果在print语句中使用Python3,请将print()放在括号中。 请参阅

我正在尝试执行的代码:

print "Creating account %s with the password %s" % (username1, password1)

您正在使用Python 3。调用print函数需要括号:

print("Creating account %s with the password %s" % (username1, password1))

看起来您正在使用Python3,所以如果在print语句中使用Python3,请将print()放在括号中。 请参阅文档。

谢谢和问候
纳文·达拉尔

谢谢,现在修好了。我不知道我需要对StackOverflow的欢迎!仅供将来参考,您应该将代码/跟踪发布到问题中。要查看有关发布更好问题的更多信息:)