I have a list of days in a year:
days = [0,1,2,3,...,363,364,365]
And a list of minutes of cloud on that day that is the same length:
weather = [0,60,150,80,...,120,90,150]
I want to delete the items in days
if the corresponding index value of weather
is greater than some condition, e.g if
condition = 120
Then my days
list would look like:
days_new = [0,1,3,...,364]
So I'm thinking of something like:
for i in xrange(len(days)):
if weather[i] > condition:
del days[i]
Is there a 'neater' way of doing these kind of operations?
edit: my days
list won't necessarily correspond to their indexes, this is a simplified case