官术网_书友最值得收藏!

Removing elements from lists

We can use the del command to delete either an element from the list or the whole list. The del command does not return anything. We can also use the pop method to remove elements from the list. The pop method takes the index of the element that we wish to remove as an argument:

The entire list structure can be deleted as follows:

主站蜘蛛池模板: 壶关县| 宁阳县| 饶河县| 平凉市| 利津县| 吐鲁番市| 临高县| 咸宁市| 航空| 宁陵县| 昌邑市| 辉县市| 泰宁县| 基隆市| 夏河县| 乐东| 麻城市| 铜陵市| 隆安县| 伊通| 抚远县| 长岛县| 甘孜| 大同市| 工布江达县| 桦甸市| 日土县| 万载县| 灌阳县| 宣化县| 昔阳县| 上林县| 曲麻莱县| 甘肃省| 房山区| 长丰县| 漳平市| 舞钢市| 榕江县| 二手房| 从化市|