所属模块:内置
功能:打印
实例1:print中end的作用
#!/usr/bin/python3
#code-python(3.6)
#默认用换行符连接两行
print("first")
print("second")
#不换行,用空字符串连接两行
print("first",end='')
print("second")
#不换行,用空格连接两行
print("first",end=' ')
print("second")
#不换行,用字符xx连接两行
print("first",end='xx')
print("second")
该网站可在线测试本文代码,以便快速理解本文代码:http://kakazai.cn/index.php/Kaka/Python/query/name/print
最后
以上就是明亮宝贝最近收集整理的关于python:print函数中end的作用print的全部内容,更多相关python:print函数中end内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复