Hey all, still working on my lil program. But now that I'm getting into loops I'm pretty confused on this one. Needless to say I think this is the first while loop I have used since I started python about a week ago. What I'm trying to do at this point is narrow the possibilities down by checking the list for an instance of charecters in the scrambled word. Well I thought this would run through the list and check each item, but the problem is the index seems to be going out of range, I thought because as it is deleting items there is no update to the variable. So I tried putting something like c = c - 1 after deleting but I think this made it worse after printing the index number after and getting negative results. I assume it has something to do with the for loop its wrapped inside, but not sure. Anyway this is the code any help or suggestions would be awsome, thanks btw for all the help so far.
word = possible[p]
x = len(matches)
while c < x:
c = c + 1
print len(matches)
print c
for letter in word:
if letter in matches[c]:
nothing = 0
else:
del matches[c]