medium
Optimize Python Loop
Refactor a slow nested loop into a list comprehension or map function.
📝 প্রম্পট বিষয়বস্তু
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.