python刪除字符串中某個字符,用replace()方法來處理

Python replace() 方法把字符串中的 old(舊字符串) 替換成 new(新字符串),若是指定第三個參數max,則替換不超過 max 次。html 語法 replace()方法語法:python str.replace(old, new[, max]) 參數 old – 將被替換的子字符串。 new – 新字符串,用於替換old子字符串。 max – 可選字符串, 替換不超過 max
相關文章
相關標籤/搜索