I just learned about list comprehension, which is a great fast way to get data in a single line of code. But something\'s bugging me.
In my test I have this kind of
Sounds like you want something like:
my_dict = {'test1420': {'y': '060', 'x': '070', 'fname': 'test1420'},
'test277' : {'y': '072', 'x': '094', 'fname': 'test277'}}
new_dict = dict((k,v) for k,v in my_dict.items()
if 92 < int(v['x']) < 95 and 70 < int(v['y']) < 75)
Some notes on this code:
low < value < high