It is not clear that there is a 'None'
in the dictionary that you posted. If it is a string, you can use the following:
dict((k, 'updated') for k, v in d.iteritems() if v != 'None')
If it is None
, just replace the check, for example:
dict((k, 'updated') for k, v in d.iteritems() if v is None)
khachik
source share