Lists
add
list1+list2
append
list1.append("words")
Index 索引
text4[173]
text4.index('awaken')
slicing 切片
text5[n:m]
variable 變量
不能使用空格、連字符 ‘-’(會解釋爲減號)
Lists
add
list1+list2
append
list1.append("words")
Index 索引
text4[173]
text4.index('awaken')
slicing 切片
text5[n:m]
variable 變量
不能使用空格、連字符 ‘-’(會解釋爲減號)
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo