Alex Rivera | Logout

Erase whole array Python

Asked 2010-08-17T04:01:30.900
47

How do I erase a whole array, leaving it with no items?

I want to do this so I can store new values in it (a new set of 100 floats) and find the minimum.

Right now my program is reading the minimum from sets before I think because it is appending itself with the previous set still in there. I use .append by the way.

Edit
Report

1 Answer

34

It's simple:

array = []

will set array to be an empty list. (They're called lists in Python, by the way, not arrays)

If that doesn't work for you, edit your question to include a code sample that demonstrates your problem.

answered 2010-08-17T04:02:28.997

Your Answer