2018.3.18 學習筆記

python 3 1. join() 方法用於將序列中的元素以指定的字符鏈接生成一個新的字符串。 實例html str = "-"; seq = ("a", "b", "c"); # 字符串序列 print str.join( seq ); 輸出python a-b-c 2. items()方法以列表返回可遍歷的(鍵, 值) 元組數組。 實例數組 dict = {'Name': 'Runoob',
相關文章
相關標籤/搜索