把內容過程中比較重要的內容珍藏起來,下面內容段是關于python各種刪除空格的方法匯總的內容。
" xyz ".strip() # returns "xyz"
" xyz ".lstrip() # returns "xyz "
" xyz ".rstrip() # returns " xyz"
" x y z ".replace(' ', '') # returns "xyz"
本文摘自 :https://www.cnblogs.com/