Python 3 教程
Python 集合
clear() 方法用于移除集合中的所有元素。
clear()方法語法:
set.clear()
無。
移除 fruits 集合中的所有元素:
輸出結(jié)果為:
set()