medium
Optimize Python Loop
Refactor a slow nested loop into a list comprehension or map function.
📝 Promptens innehåll
Review the following Python code snippet containing a nested for loop used to filter a list of dictionaries. Refactor the code to use a list comprehension or the filter function to improve performance and readability.