Python List clear() Method - Syntax & Examples - Remove all items from list

Published: 02 July 2024
on channel: ProgramGuru
30
4

Python List clear() method
In this video, we will learn about clear() method of list object, its syntax, and examples.
clear() method removes all items from the list. It makes the list empty.

The syntax of clear() method is:
list.clear()
Consider a list of items with some items in the list. When we call clear() method on this list, the method removes all items from the list. The length of the list is reduced to zero.


On this page of the site you can watch the video online Python List clear() Method - Syntax & Examples - Remove all items from list with a duration of hours minute second in good quality, which was uploaded by the user ProgramGuru 02 July 2024, share the link with friends and acquaintances, this video has already been watched 30 times on youtube and it was liked by 4 viewers. Enjoy your viewing!