Concept

clear()

The built-in function remove all elements in a list.

Calling my_list.clear() is the same as del my_list[:].

Image 0

0

1

Updated 2021-05-19

Tags

Python Programming Language

Data Science