populate nested dictionary python for loop