Hey guys I've been trying extremely hard to get these functions to work but they don't unfortunately and I do not know whats wrong with it "beginner python user"

I have to return a new list that contains items from the list image that pass the filter (a str)so far I've got

def process_filter_description(filter, images, ial):

filter.lower and images.lower
for dict in images:
if dict.has_key(filter):
return dict[filter]

The other function I'm having trouble with is to find a way to update the ial (image association list) with the tokens from string description. image (a str) is the name of the image to be associated with the keys in description.

so far I have no idea where to start except

def record_associations(description, image, ial):


Thanks guys !