How do I compare one index to the previous index within the same list?
<p>I'm trying to make this program look at each previous number in a list, and determine if that number is bigger than it. If it is, it should record how many times bigger, and return it at the end. i.e. the count (I'm using num as the variable) starts at 0. But 10 is bigger than 7 so num becomes 1. Now 7 isn't bigger than 20 so the count stays the same. but 20 is bigger than 15 so the count (num) is 2. and 15 is bigger than 4 (count is 3). Now 4 is not bigger than 6 (count does not change) and 6 is not bigger than the next number because there is no next number. This is what I have now. I'm thinking lst[i] and lst[i+1] need to be used to reference index maybe? Can anyone walk me through this? Thanks.</p>

<pre><code>def count(lst):
num = 0 
some sort of division here? then add to num variable?

#main prog
( count([10, 7, 20, 15, 4, 6]) ) 
</code></pre>
