Learn Before
Concept

clear()

The clear() method removes all items from a set structure. Usage:

students = {"John", "Joe", "Jerry"} students.clear() print(student)

The clear() method removes all items in the student dictionary. The final print statement outputs {}.

0

2

Updated 2021-05-22

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science

Related