title: function to be used in python to remove particular text after phrase
body: <p>I have an output like :</p>
  
  <pre><code>apple
  100
  banana
  50
  orange
  12
  grapes
  133
  </code></pre>
  
  <p>I have to remove the entire text after orange
  and represent the output only as</p>
  
  <pre><code>apple
  100
  banana
  50
  </code></pre>
  
  <p>which function in python we need to use (and the way i have written the output is correct only it represent one by one order)?</p>