在python中打印时若是打印内方法未添加end,则自动换行,如:
print("helloworld")
print("abc")
原创作品请勿抄袭
如果添加end方法,则不会换行,如:
print("helloworld",end="")
print("abc")
原创作品请勿抄袭
当然,添加 end方法也可以换行,如:
print("helloworld",end="\n")
print("abc")
原创作品请勿抄袭
,在python中打印时若是打印内方法未添加end,则自动换行,如:
print("helloworld")
print("abc")
原创作品请勿抄袭
如果添加end方法,则不会换行,如:
print("helloworld",end="")
print("abc")
原创作品请勿抄袭
当然,添加 end方法也可以换行,如:
print("helloworld",end="\n")
print("abc")
原创作品请勿抄袭
,