title: Slice a list in python
body: <p>I have a list in python like: </p>
  
  <pre><code>l = [1,2,4,5,7,8,2,1]
  </code></pre>
  
  <p>I want a code that will check if the number before in the list is bigger that the next one. And if it is i want the code to remove the the number. I want my code to return <code>[1,2,4,5,7,8]</code> and remove the <strong>last 2 and 1</strong>.</p>
  
  <p>Pseudo code:</p>
  
  <pre><code>If l[i] &gt; l[i+1]
  remove l[i+1]
  then check if l[i] is bigger than the next one after that. What use to be l[i+2]
  </code></pre>
  
  <p>Can someone help me?</p>