近观Python: Texts as list of words

来源:互联网 发布:mac地址 ip 编辑:程序博客网 时间:2024/05/29 04:37

Lists

add

list1+list2

append

list1.append("words")

Index 索引

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

slicing 切片

text5[n:m]

variable 变量

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