Python List clear() method

The list.clear () method in Python extends the list by appending all the items from the iterable.

Syntax

Parameter

NA

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This