insert()向列表的指定位置添加元素,例如:insert的第1列a=["hello","world","dlrb"]2a.insert(1,"girl")3print(a)output:['hello','girl','world','dlrb']我们插入元素girlA=[1,2,3,4,5,6,8]A.insert(6,7)print(A)result:[1,2,3,4,5,6,7,8]insert有以下5种情况:1:当index=0时,从头插入对象。2:当index>0且index

insert()向列表的指定位置添加元素,例如:insert的第1列a=["hello","world","dlrb"]2a.insert(1,"girl")3print(a)output:['hello','girl','world','dlrb']我们插入元素girlA=[1,2,3,4,5,6,8]A.insert(6,7)print(A)result:[1,2,3,4,5,6,7,8]insert有以下5种情况:1:当index=0时,从头插入对象。2:当index>0且index