linux系統函數 監測系統參數用的

strip():數組 Python中的strip用於去除字符串的首位字符,同理,lstrip用於去除左邊的字符,rstrip用於去除右邊的字符。這三個函數均可傳入一個參數,指定要去除的首尾字符。函數 代碼以下: theString = 'saaaay yes no yaaaass' print theString.strip('say') spa theString依次被去除首尾在['s','a'
相關文章
相關標籤/搜索