within my program I have a list, and I would like a loop until all of a column of the list equals 2. All of the items in the column are numbers but some are formatted as strings and some are formatted as integers, because they are changed in other parts of the program. Below are 3 solutions I have tried, I am running python 2.7.
while (int(newlist[0][1]) != 2) and (int(newlist[1][1]) != 2) etc... != 2:
The problem I am having is that the loop is ending when only one of the list items (rather than the whole column) equals 2
while int(newlist[0-8][1]) != 2:
while int(newlist[0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8][1]) != 2:
If anybody could tell me what I'm doing wrong or a better way of doing it, I would really appreciate the help