Python 列表list方法clear( )和直接list [ ]的区别

x.clear()是将内存地址清空,

x=[ ]会新开辟一个内存空间。

原文地址:https://www.cnblogs.com/rainbow-1/p/15368325.html