python:split()函數

描述 Python 內置函數html 指定分隔符對字符串進行切片 若是參數 num 有指定值,則僅分隔 num 個子字符串 返回分割後的字符串列表。 語法 str.split(str="", num=string.count(str)).markdown str -- 分隔符,默認爲全部的空字符,包括空格、換行(\n)、製表符(\t)等。 num -- 分割次數。 轉載於:https://www.
相關文章
相關標籤/搜索