Python3-深入解析List clear()方法 cleaR() 函数用于清空列表,类似于 del a[:] cleaR()方法语法: list.cleaR() 该方法没有返回值。 以下实例展示了 cleaR()函数的使用方法: 以上实例输出结果如下: