在python中打印时若是打印内方法未添加end,则自动换行,如:

print("helloworld")

print("abc")

如果添加end方法,则不会换行,如:

print("helloworld",end="")

print("abc")

当然,添加 end方法也可以换行,如:

print("helloworld",end=" ")

print("abc")

收藏 打印