title: Dictionary of lists that include either all even or all odd combinations of numbers
body: <p>I want to create a dictionary of either all even or all odd combinations of integers. 
  My code so far:</p>
  
  <pre><code>values = [[0,1,2],[0,1,2],[0,1,2]] 
  
  combos = np.array([list(i) for i in np.array(np.meshgrid(*values)).T.reshape(-1,len(values))])
  
  print(combos)
  </code></pre>
  
  <p>This takes three lists that each contain the integers 0-2</p>
  
  <p>and uses an element from each list to create a combination of three integers</p>
  
  <p>All possible combinations are printed: [0,0,0], [0,1,0], [0,2,0], [1,0,0] ... [2,2,2]   </p>
  
  <p>I am trying to discard all the results that do not contain either all odd or all even numbers.</p>
  
  <p>I would like the remaining results to be in a dictionary
  (for example I want to keep [0,0,0] and [0,2,0] but discard [0,1,0])</p>
  
  <p>So far I have these ideas but not sure where to go from there:</p>
  
  <pre><code>r=combos%2  #remainder after dividing everything by 2
  keep= np.all(r==0) and np.all(r==1)
  </code></pre>
  
  <p>Any help would really be appreciated!</p>