在讀文件時常常得到一些\n和引號之類的符號,可以使用字符串的成員函數strip()來去除。 1.去除首尾不需要的字符a= '"This is test string"' # strip() ...
確定! 回上一頁