Computer Science, asked by toharshit007, 6 months ago

Write a program to remove all element of list. in python​

Answers

Answered by hasnainzainab18
0

Answer:

Remove all items from a list in Python

list. 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 –

Similar questions