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

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:

主站蜘蛛池模板: 漯河市| 长治县| 上思县| 台州市| 祥云县| 朝阳市| 承德县| 高青县| 界首市| 莒南县| 青川县| 清新县| 凌源市| 保定市| 泾源县| 兰坪| 郎溪县| 新民市| 新宾| 云霄县| 海晏县| 深州市| 开平市| 湄潭县| 六枝特区| 邵阳县| 桂林市| 拉孜县| 昌平区| 奈曼旗| 大庆市| 河北区| 花莲市| 达拉特旗| 株洲市| 余姚市| 乐清市| 墨竹工卡县| 泗阳县| 巧家县| 普陀区|