dict1 = {'a' : (1, 2), 'b': (666, 5)}dict2 = {key:val for key, val in dict1.items() if val[0] >=1 and val[0] <=10}print(dict2)
Standard input is empty
{'a': (1, 2)}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!