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}
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}