python怎么讓for循環輸出不換行?
讓Python輸出不換行,只需清楚print函數默認end參數為'\n',調用print時修改為不是換行符即可,比如:
for i in "abcd":
print(i,end=",")
則輸出a,b,c,d
python怎么讓for循環輸出不換行?
讓Python輸出不換行,只需清楚print函數默認end參數為'\n',調用print時修改為不是換行符即可,比如:
for i in "abcd":
print(i,end=",")
則輸出a,b,c,d