产生输出的最简单方法是使用print语句,您可以在其中传递零个或多个用逗号分隔的表达式。此函数将您传递的表达式转换为字符串,并将结果写入标准输出,如下所示:
#!/usr/bin/python print "Python is really a great language,", "isn't it?"
输出结果
这会在标准屏幕上产生以下结果-
Python is really a great language, isn't it?