TypeError: list indices must be integers or slices, not list
This is a classic mistake. i in your case is already an element from array (i.e. another list), not an index of array (not an int), so if Volume == i[2]: counter += 1 You can check the Python tutorial. Also, try doing this: for i in array: print (i) And see what you get! … Read more