title: Creating a dictionary of booleans from a list of variables
body: <p>I'm trying to create a dictionary of booleans using the variables of an expression. So if expression 1 had the variables <code>{x,y,z}</code> I can create a dictionary that when produced would return something like <code>{'x': True, 'y': True, 'z': True}, {'x': False, 'y': True, 'z': True} ... etc</code></p>
  <p>But I'm really struggling as this function needs to work with sets / (maybe I should make them into lists?) of different variables, so for just <code>{x}</code> the dictionary would be <code>{'x' : True}, {'x' : False}</code></p>
  <p>So far I'm trying a code along the lines of</p>
  <pre><code>def dicx(self):
      for i in self.vars():
          dicxow = { i : True for i in self.vars() }
          dicxow1 = dicxow.copy()
          dicxow1 = {i : False for i in self.vars() }
          return dicxow, dicxow1
  </code></pre>
  <p>where <code>self.vars()</code> returns all the variables in an expression.</p>
  <p>I'm so lost as to where to go from this as I can't work out how to change just one part of the dictionary for each different variable and so any hints would be appreciated. My task included the use of classes so I am using classes to do this (I'm not sure if that makes a difference here).</p>
  <p>Edit:</p>
  <p>Ok sorry, so I just want to create a dictionary with every possible combination of True and False for x amount of variables but I am struggling to do so. self.vars() returns a set of variables from an expression e.g. {x,y} and from that I want to create a function to generate every combination of True and False for x and y.</p>