print的常用:
print('hello world!')
print('hello','world!') # 逗號自動添加默認的分隔符:空格。
print('hello' + 'world!') # 加號表示字符拼接。
print('hello','world',sep='***') # 單詞間用***分隔。
print('#' * 20) # *號表示重復20遍。
print('are you sure?', end='') # 默認print會打印回車,end='' 表示不要回車。
輸出結果:
?