代码示例:(标识:python_set_clear)
python_set_clear.py
thisset = {"apple", "banana", "cherry"}

thisset.clear()

print(thisset)
运行结果: