title: Appending elements to an empty dictionary of lists in Python
body: <p>I want to take an empty dictionary and dynamically make it a dictionary of lists. In other words, I have an empty dictionary, and as I read in values <strong><em>one by one</em></strong> from a file, I would like to append them one by one to a given dictionary key (which may or may not exist already).</p>
  
  <p>The challenge is that I can't create the list at once. I can only append values one by one, but I'm not sure how I can tell Python that I want a dictionary of lists when I add the first element. </p>
  
  <p>If the dictionary starts out as empty, then how can I make it a dictionary of lists when I create the <em>first</em> key-value pair? How would I then go about appending subsequent values to the same key?</p>