title: More elegant way to write if else in python
body: <p>For example if I have the code:</p>
  
  <pre><code>class Example ():
  
      def a(self):
          return 'Buy'
  
      def b(self):
          if (self.a() == 'Buy'):
              return 'BUY SET'
          elif (self.a() == 'Sell'):
              return 'SELL SET''
  
  o = Example()
  value = o.b()   
  print value 
  </code></pre>
  
  <p>Is there a more elegant/pythonic way I could write function b(self) ?</p>