On Mon, Feb 25, 2013 at 10:15 PM, Anand Chitipothu <[email protected]>wrote:
>
>
> I think, the second solution I suggested is more Pythonic than using a for
> loop. In Python 3, it can be written as a dictionary-comprehension.
>
> dictionary = {(k, v) for k, v in dictionary.items() if v != 1}
>
>
True. Using dictionary comprehension is the apt solution. I was just
talking about the first solution you suggested.
--
blog : ragsagar.wordpress.com
mail id : python -c "print '@'.join(['ragsagar','.'.join([x for x in
['gmail','com']])])"
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers