近观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 变量

不能使用空格、连字符 ‘-’(会解释为减号)





你可能感兴趣的:(NLP,with,Python(NLTK),NLP,NLP,with,Python,Python)