字符串魔法(七個基本函數)

  1.join()    :用某個符號將字符串中的每一個子字符串隔開,如圖用空格將weitaoge隔開html test1= "weitao" test2 =" ".join(test1) print(test2) w e i t a o   2.split()    :將字符串分割 :如圖中以「a」做爲分隔符,1表示以第一個「a」做爲分隔符。.rsplit()表示從右開始數post test
相關文章
相關標籤/搜索