title: Dividing dictionary that contain lists in python
body: <p>I am new in programming and in python and I am trying to create a model using this language.
  In my model, I will create a community that is a group of households. Each community will be a list containing all the households and each household will be a dictionary containing the list of male, females, the number of members etc (therefore will include int and list). So would be something like:</p>
  
  <pre><code>hh = {'num_members' : 0, #number members hshd
        'list_male' : [] #list male members
        'list_female' : [] #list female members}
  </code></pre>
  
  <p>In each members list, there will be the age of each individual living in the household, so, for example, imagine a household have 4 females and 3 males, the list_female would be something like list_female = [4,15,50,40], the list_male = [45,30,13] and the num_members = 7
  The list will be created randomly and updated during the model (people will have kids, die etc).</p>
  
  <p>What I want to do is: if the number of members (num_members) exceed the max household size I will divide the household into two households, each containing half of the members of the lists (define randomly), but I have no idea how to do so. I saw some ways to divide dictionary but none contained a list involved so I am a bit lost. Any idea how I could do so? </p>
  
  <p>One point that is important to remember is that when I create the new household it will be included in the community (and each household will be accessed in a loop, for the whole community)</p>
  
  <p>Thanks in advance</p>