Python中对列表进行添加、插入元素等操作
1、在列表中插入值(1).append()方法在列表末尾插入元素sm = ['cat','dog','bat','spider']sm.append('fox')print(sm)#['cat','dog','bat','spider','fox'](2).insert()方法在列表自定义位置插入元素sm = ['cat','dog','bat','spider']sm.insert(2,'fox...