I have a dictionary as:
default = {\'a\': [\'alpha\'], \'b\': [\'beta\',\'gamma\'], \'g\': []}
I wish to eliminate the empty values as:
dict((k, v) for k, v in default.iteritems() if v)
This filters all items which are not empty strings, empty dict/tuple/list.