📜  如何清除数组python代码示例

📅  最后修改于: 2022-03-11 14:46:15.143000             🧑  作者: Mango

代码示例1
array = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(array)
# Output [1, 2, 3, 4, 5, 6, 7, 8, 9]

array.clear()
print(array)
# Output []