python create dictionary and append to list