如何 运行 将 print 用作 python 3.x 关键字的旧代码?
how to run old code where print is used as keyword with python 3.x?
我知道在 python 3 中关键字 print 变成了一个函数。
但是是否可以重用我的旧代码而不用替换每个
print "Error text"
作者:
print("Error text")
每手?
我建议您阅读有关 Automated Python 2 to 3 code translation 的内容,看看它是否对您有用?
我知道在 python 3 中关键字 print 变成了一个函数。 但是是否可以重用我的旧代码而不用替换每个
print "Error text"
作者:
print("Error text")
每手?
我建议您阅读有关 Automated Python 2 to 3 code translation 的内容,看看它是否对您有用?