python flatten dictionary into list