chevron_left
Set Operations
0
0
0
new
Python Set | clear method
Programming
chevron_rightPython
chevron_rightOperations
chevron_rightSet Operations
schedule Jul 1, 2022
Last updated Python
Tags tocTable of Contents
expand_more Python's set.clear()
method removes all items from a set.
Parameters
set.clear()
does not take any parameters.
Return value
None
Examples
Basic usage
car = {"Toyota","Nissan","Honda"}car.clear()print(car)
set()
Published by Arthur Yanagisawa
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Official Python Documentation
https://docs.python.org/3/library/stdtypes.html#frozenset.clear
0
0
0
Enjoy our search