Yes, this is a standard dict comprehension, I don't see what is confusing -- perhaphs that the key is dynamic?