print可以在需要輸出的內(nèi)容的最后,添加end和sep來定制一個print打印完成后默認(rèn)的輸出內(nèi)容和一個print打印多個內(nèi)容的時候多個內(nèi)容之間的間隔
print(1111,end = ' ')
print(2222,end = '+')
print(3333,end = '%')
輸出結(jié)果: 1111 2222+3333%
print(1,1,1,sep = '-')
輸出結(jié)果: 1-1-1
數(shù)據(jù)交換
a,b = b,a