InterviewSolution
Saved Bookmarks
| 1. |
Write a program to remove all element of list. in python |
|
Answer» Remove all items from a LIST in Pythonlist. clear() list. ...Slice assignment. We can empty the list by REPLACING all the elements with an empty list. But simply doing a = [] won't clear the list. ...The del statement. The del statement can also be used to delete the CONTENTS of an entire list. This is ILLUSTRATED below – |
|