I'm a newbie on Python, and am struggling with a small piece of my code I just don't understand why it won't work.
I have list of lists, containing 3 numbers each. I want to check if the first two numbers are the same for some of the lists. Why doesn't this work? What should I do to get it work?
list=[[0, 4, 0], [1, 4, 0], [0, 3, 1], [0, 4, 1]]
sorted(list)
for i in range(len(list)-1):
if list[i][0][1] == list[i+1][0][1]:
print "overlap"