关于print()里面的sep和end参数的使用

print('hello', 'world')   #默认用空格隔开
#hello world

print('hello', 'world', sep='wuli') #sep=''可以用来设置连接的字符串
#hellowuliworld

print('hello')
print('world')  #print有默认换行功能
#hello
#world

print('hello', end='')  #end=''可以设置print结束后的字符
print('world')
#hello哈world

 

posted @ 2019-01-07 11:04  Sakura媛媛  阅读(1846)  评论(0编辑  收藏  举报