下面的輸出應該沒有空格嗎?輸出應該是一樣的,一個是整個string.why會發生這種情況?如何達到所要求的結果,順便說一句是新來的蟒蛇一個字符串打印時應該不應該有空格,不應該有空格
print ('this addWeaponCargo ["srifle_DMR_01_DMS_F", 4];') # expected print
print (add_weapon_to_vehicle,'["',Rahim,'"',",",Quantity,']',';') # this is output should be like the one at the top , why are there spaces ?
輸出
this addWeaponCargo ["srifle_DMR_01_DMS_F", 4];
this addWeaponCargo [" srifle_DMR_01_DMS_F " , 4 ] ;