一、列表操作符
①len(list)内置函数
②累加+累乘*
列表不可以用 += 不可以用 *=
③in not in
二、列表内置函数:append(item)
list.append(new_item)
注:被添加的元素只会被添加到末尾;append(item)后,列表id值没有变化
输出为:
三、列表内置函数:insert(index,new_index)
注:insert传入的位置列表中不存在,则将新元素添加到列表末尾
append(item)函数 和 insert(index, item)函数,都是不用新列表来接收的,直接改动原列表,且原列表id不变
四、列表(元组)内置函数 count(item)返回列表中某成员的个数
元组只有两个内置函数count函数