title: Switch in Python
body: <p>I have tried making a switch like statement in python, instead of having a lot of if statements. </p>
  
  <p>The code looks like this:</p>
  
  <pre><code>def findStuff(cds):
      L=[]
      c=0
      for i in range(0, len(cds), 3):
          a=differencesTo(cds[i:i+3])
          result = {
              a[2][0]==1: c=i+1,
              a[2][1]==1: c=i+2,
              a[2][2]==1: c=i+3,
              a[1]==1: L.append((cds[i:i+3], a[0], c))
          } 
      return L
  </code></pre>
  
  <p>My problem is, that this does not work. (Works with if statements, but this would in my opinion be more pretty).</p>
  
  <p>I have found some examples of switches in Python, and they follow this structure. Can anyone help me?</p>