02-print用法

作者: pengwg | 来源:发表于2019-11-19 13:17 被阅读0次
print('hello world!')
print('hello', 'world!')  # 逗号自动添加默认的分隔符:空格
print('hello' + 'world!')  # 加号表示字符拼接
print('hello', 'world', sep='***')  # 单词间用***分隔
print('#' * 50)  # *号表示重复50遍
print('how are you?', end='') # 默认print会打印回车,end=''表示不要回车

相关文章

网友评论

    本文标题:02-print用法

    本文链接:https://www.haomeiwen.com/subject/ylpwictx.html