title: function for ```model += constraint_lhs == constraint_rhs``` in pulp python
body: <p>I'm solving an LP using pulp. I want to add constraints to my model.
  Most friendly way is :</p>
  <pre><code>model += lhs == rhs
  </code></pre>
  <p>When we want to add constraints using <code>apply</code> method in <code>pandas.DataFrame</code>, since lambda methods don't take <code>+=</code> sign in them, we need to do something like this:</p>
  <pre><code>df['variable'].apply(lambda x: model.__iadd__(lhs==rhs))
  </code></pre>
  <p>Now, I don't want to use <code>__iadd__()</code> method directly, rather I want to make a function for this.
  What I'm trying to achieve is something like this:</p>
  <pre><code>`expression is our constraint`: lhs == rhs
  
  def add_to_model(model, expression):
      return model.__iadd__(expression)
  </code></pre>
  <p>An example:</p>
  <pre><code>def add_to_model(model, x==0)
      return model.__iadd__(x==0)
  </code></pre>
  <p>Because in the above function, <code>expression</code> variable will be treated as <code>Boolean</code>, this is not serving the purpose. Any suggestions on how to achieve this?</p>