filterInRange Define a function named filterInRange with four parameters. The first argument passed to the function should be a list of dictionaries (the data), the second a string (a dictionary key), with the third and fourth arguments being numbers, representing the low and high values of range. This function must return a list of all the dictionaries from the input list which contain the key:value pairs where low <= value < high. Sample function call: filterInRange(data,'value', 0, 8000) def filterInRange(data,k,l,h): y=[] for s in data: for w in s.values(): if w<h and w>=l: y.append(s) return y
Sample function call: filterInRange(data,'value', 0, 8000)
def filterInRange(data,k,l,h):
y=[]
for s in data:
for w in s.values():
if w<h and w>=l:
y.append(s)
return y
怎么就不对了呢