<div>a = [[1,1],[3,1.5],[5,0]]</div> <div>for i in range(len(a)) :<BR> if a[i][1] > a[i-1][1] :<BR> print 'greater !!'<BR> else:<BR> print "smaller"</div> <div>greater !!</div> <div>greater !!</div> <div>smaller</div> <div><BR>Thanks for taking the time to help me Aditya. I tried the code but have encountered a problem. In this new list,<BR>[1, 1]<BR>[3, 1.5]<BR>[5, 0]</div> <div>only the second and third "greater" and "smaller" output are correct as 1.5 is larger than 1 and 0 is smaller than 1.5. What is i[1] greater than? </div> <div>I also tried using + for next item instread, but that produced an error. Why?</div> <div> if a[i][1] > a[i+1][1] </div><p> 
<hr size=1>Be a better sports nut! Let your teams follow you
with Yahoo Mobile. <a href="http://us.rd.yahoo.com/evt=51731/*http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
">Try it now.</a>