You can use a dict comprehension:

{k: v for k, v in points.items() if v[0] < 5 and v[1] < 5}

And in Python 2, starting from 2.7:

{k: v for k, v in points.iteritems() if v[0] < 5 and v[1] < 5}
Answer from Thomas on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › filter-list-of-python-dictionaries-by-key-in-python
Filter List of Python Dictionaries by Key in Python - GeeksforGeeks
July 23, 2025 - The filter() function applies a lambda function that checks if the "age" key in each dictionary is greater than 30.
Discussions

Filtering a dictionary value from a list of dictionary using lambda and filter in python - Stack Overflow
I want to get the value of the dictionary that has the key 'Name' Initially I wrote a function as below: def get_json_val(l, key): for item in l: for k, v in item.iteritems(): if k == key: return v · But I want to do it using lambdas and filter in a single line. More on stackoverflow.com
🌐 stackoverflow.com
January 11, 2018
Lambda filter a list of dictionaries Python - Stack Overflow
I started programming with python a little while ago I have a doubt with dictionary I have this array and I already have a method that gets an id array, I tried with lambda to create a filtered l... More on stackoverflow.com
🌐 stackoverflow.com
The best way to filter a dictionary in Python - Stack Overflow
Note that this is not strictly a filter because it does create a new dictionary. ... Sign up to request clarification or add additional context in comments. ... the lambda is feed the keys from the dict, and compares the values in the dict for each key, against the criteria, returning back the acceptable keys. ... Questioner is looking to return a dictionary, this only returns the keys of the dictionary. And it's simply less efficient/Pythonic ... More on stackoverflow.com
🌐 stackoverflow.com
How to filter dictionary by value?
Use dictionary comprehensions. They work pretty much the same as list comprehensions and generator expressions. filtered_dict = {key: value for key, value in old_dict.iteritems() if value > 90} More on reddit.com
🌐 r/learnpython
10
12
December 10, 2013
🌐
YouTube
youtube.com › watch
Python 3 Programming Tutorial | #10 Filtering Dictionary using filter function and lambda function - YouTube
In this python 3 programming tutorial video I have talked about how you can filter dictionaries using filter and lambda expression. #DataScienceWithPython #D...
Published   July 12, 2018
🌐
Medium
medium.com › @muirujackson › set-dictionary-and-lambda-filter-reduce-and-map-functions-4b304a30a0da
Set, Dictionary, and Lambda, filter, reduce and map functions | by Muiru Jackson | Medium
June 14, 2023 - In this article, we explored sets and their methods, compared sets with lists, learned how to iterate over sets, discussed dictionaries and their advantages, and delved into lambda functions, map, reduce, and filter functions. These concepts are essential for any Python programmer looking to work with different data structures efficiently and leverage powerful functions to simplify coding tasks.
🌐
Sololearn
sololearn.com › en › Discuss › 3283767 › filter-and-lambda-expressions-with-dictionaries-update-answered
Filter and lambda expressions with dictionaries. Update: Answered | Sololearn: Learn to code for FREE!
July 9, 2024 - but we can use the membership operator `in`. to get it done we can filter for the letter `a` like: ... k_names = dict(filter(lambda item: 'a' in item[1], figures.items())) > result will be: {'chicken': 'Klaartje', 'horse': 'Karel', 'duck': 'Donald'} >> to make the filtering with the dicts a bit more general, we can use input values, store them in a variable,and use this variable instead of the *hardcoded* samples we have been talking so far. ... if you are looking for more complex patterns than startswith(), endswith(), and "in", consider "regular expressions" (not sure if it is covered in the current courses?). ... Lisa , regex is *not* explained in the current available python tutorials.
🌐
datagy
datagy.io › home › python functions › python filter: a complete guide to filtering iterables
Python filter: A Complete Guide to Filtering Iterables • datagy
December 20, 2022 - The Python filter function is a built-in way of filtering an iterable, such as a list, tuple, or dictionary, to include only items that meet a condition. In this tutorial, you’ll learn how to use the filter() function to filter items that ...
Find elsewhere
🌐
LearnPython.com
learnpython.com › blog › filter-dictionary-in-python
How to Filter a Python Dictionary | LearnPython.com
December 26, 2022 - Learn how to filter Python dictionaries by keys and values, including using multiple keys and conditions at once.
🌐
Medium
medium.com › @miguel.amezola › processing-objects-in-a-dictionary-with-lambda-functions-and-higher-order-functions-91aa59be76b5
Processing Objects in a Dictionary with Lambda Functions and Higher-Order Functions | by Miguel Amezola | Medium
February 11, 2023 - The lambda function takes a single ... less than 30. The filter function applies the lambda function to each tuple in the list, returning a new list with only the tuples for which the lambda function returns True....
🌐
GitHub
gist.github.com › 89465127 › 5776892
python filter a dictionary by keys or values · GitHub
@fbens iteritems is gone if you're using python 3. try d.items() instead · Copy link · Copy Markdown · can use this for value search d3 = {k : v for k,v in filter(lambda t: t[1] in [22, 33], d.iteritems())} Sign up for free to join this conversation on GitHub.
🌐
Python Guides
pythonguides.com › python-dictionary-filter
How to Filter a Dictionary in Python
November 10, 2025 - The filter() function in Python can also be used to filter dictionaries. It’s especially useful when you want a more functional programming approach. ... # Using filter() and lambda to filter dictionary employee_data = { 'John': 72000, 'Emma': 85000, 'Michael': 64000, 'Sophia': 91000, 'David': ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › lambda-filter-python-examples
Lambda and filter in Python Examples - GeeksforGeeks
April 8, 2025 - Python · from collections import Counter s = ["geeks", "geeg", "keegs", "practice", "aa"] ts = "eegsk" # Using filter() with lambda to find anagrams of target_str res = list(filter(lambda x: (Counter(ts) == Counter(x)), my_list)) print(res) Output · ['geeks', 'keegs'] Explanation: Counter(x) creates a frequency dictionary of characters in x.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-filter-dictionary-of-tuples-by-condition
Filter Dictionary of Tuples by Condition - Python - GeeksforGeeks
July 12, 2025 - filter(): This filters the items of the dictionary based on the condition defined in the lambda function.
🌐
AskPython
askpython.com › python › dictionary › filter-list-of-dictionaries-based-on-key-values
3 Ways to Filter List of Dictionaries Based on Key Values - AskPython
April 27, 2023 - A new list called filteredlist is created to store the list obtained from filtering the dictionary using the filter method. The lambda function is used to check through every age item in the dictionary and verify if it is greater than the threshold.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-use-the-python-filter-function
How To Use the Python Filter Function | DigitalOcean
July 24, 2020 - The Python built-in filter() function can be used to create a new iterator from an existing iterable (like a list or dictionary) that will efficiently filter out elements using a function that we provide.
🌐
Vultr Docs
docs.vultr.com › python › built-in › filter
Python filter() - Filter Collection Items | Vultr Docs
November 22, 2024 - Use the filter() function combined with dict.items() to filter the dictionary.