title: comparing ith index of one list with i+1th index of the other list
body: <p>am trying to compare ith index of one list with i+ index of the second list. </p>
  
  <pre><code>val = [10,20,30,40]
  val2 = [15,25,45]
  </code></pre>
  
  <p>I wanted to see if <code>val2[0]&lt;val[1]</code> using a for loop. How can I do this ?</p>
  
  <p>create a new list when <code>val2[i] &gt; val[i+1]</code> </p>
  
  <p>result : </p>
  
  <pre><code>val_final = [10,20]
  val2_final = [15,25]
  </code></pre>