讓Python輸出更漂亮---Print 輸出

print 默認輸出是換行的,如果要實現不換行需要在變量末尾加上 end="":   student_age=18 print("學生的年齡爲:",student_age) #print("學生的年齡爲:"),print(student_age)中間不換行     #print執行完後默認換行 print("hello,world!",end="\n") print("hello,world!",
相關文章
相關標籤/搜索