I have a dictionary with character-integer key-value pair. I want to remove all those key value pairs where the value is 0.
For example:
>>> hand
{'a': 0, 'i': 0, 'm': 1, 'l': 1, 'q': 0, 'u': 0}
I want to reduce the same dictionary to this:
>>> hand
{'m': 1, 'l': 1}
Is there an easy way to do that?