how to clear an array python

Solutions on MaxInterview for how to clear an array python by the best coders in the world

showing results for - "how to clear an array python"
Loanne
24 Feb 2016
1array = [1, 2, 3, 4, 5, 6, 7, 8, 9]
2print(array)
3# Output [1, 2, 3, 4, 5, 6, 7, 8, 9]
4
5array.clear()
6print(array)
7# Output []