course content

Course Content

Python Data Structures

Clear() MethodClear() Method

Just like in other data structures, the clear() method completely wipes out all the elements. Let's dive into the example below.

Task

You've got the set:

Your task is to erase all the items from this set.

Everything was clear?

Section 4. Chapter 6
toggle bottom row