Yes, it is similar (I am using the iterator over the dict instead instead of using a filter). In both cases, a new Dictionary is created. I think you cannot avoid it, because the first Dictionary, dict, has a different type than the desired output.
but besides the output dict, which is a new dict of different type, I think I am creating a new dict as output of the filter function. However, I am not sure because each object of this dictionary might be a reference of the input dictionary, not a copy.
Yes, you are right. My proposal uses less memory than your, maybe because you are creating a temporal dictionary using the filter. I think I am creating also copies, but I am not sure about how to avoid it.