近觀Python: Texts as list of words

Lists

add

list1+list2

append

list1.append("words")

Index 索引

text4[173]
text4.index('awaken')

slicing 切片

text5[n:m]

variable 變量

不能使用空格、連字符 ‘-’(會解釋爲減號)





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章