在Python3中,可以通过以下命令实现输出不换行的效果
print("String",end="")
但是在Python2中,这条语句会报错,为了实现相同的效果,只需要修改代码为如下即可。
print "String",