print([object, ...], *, sep=' ', end='\n', file=sys.stdout,flush=FALSE)
python中print之后是默认换行的,是因为其默认属性 end 默认值为"\n"(\n为换行符)
print('23 祝大家天天开心', end='!')
>>> 23 祝大家天天开心!
end就表示print将如何结束,默认为end="\n"(\n为换行符)
print([object, ...], *, sep=' ', end='\n', file=sys.stdout,flush=FALSE)
python中print之后是默认换行的,是因为其默认属性 end 默认值为"\n"(\n为换行符)
print('23 祝大家天天开心', end='!')
>>> 23 祝大家天天开心!
end就表示print将如何结束,默认为end="\n"(\n为换行符)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。