- Hands-On Penetration Testing with Python
- Furqan Khan
- 68字
- 2021-07-02 14:13:50
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:

推薦閱讀
- Unreal Engine Physics Essentials
- Mastering AWS Lambda
- 跟小海龜學(xué)Python
- Python Tools for Visual Studio
- 云計(jì)算通俗講義(第3版)
- Mastering Drupal 8 Views
- Swift 4 Protocol-Oriented Programming(Third Edition)
- 案例式C語(yǔ)言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)
- 響應(yīng)式Web設(shè)計(jì):HTML5和CSS3實(shí)戰(zhàn)(第2版)
- Python 3.7從入門(mén)到精通(視頻教學(xué)版)
- Mockito Essentials
- 超簡(jiǎn)單:用Python讓Excel飛起來(lái)(實(shí)戰(zhàn)150例)
- C++17 By Example
- 信息學(xué)奧林匹克競(jìng)賽初賽精講精練
- 算法訓(xùn)練營(yíng):海量圖解+競(jìng)賽刷題(入門(mén)篇)