pop items from dicts in python way