title: Python Conditional Variable Setting
body: <p>For some reason I can't remember how to do this - I believe there was a way to set a variable in Python, if a condition was true? What I mean is this:</p>
  
  <pre><code> value = 'Test' if 1 == 1
  </code></pre>
  
  <p>Where it would hopefully set <em>value</em> to 'Test' if the condition (1 == 1) is true. And with that, I was going to test for multiple conditions to set different variables, like this:</p>
  
  <pre><code> value = ('test' if 1 == 1, 'testtwo' if 2 == 2)
  </code></pre>
  
  <p>And so on for just a few conditions. Is this possible?</p>