Girish Sahani wrote: > However i am getting an error at the line marked with ***.
what error ? > Also,i am getting a ValueError in the code below: > > for s in prunedNew: > substrings = [s[:i]+s[i+1:] for i in range(len(s))] > for string in substrings: > if string not in prunedK: > prunedNew.remove(s) > continue > continue > > The error is: > prunedNew.remove(s) > ValueError: list.remove(x): x not in list the ValueError means exactly what it says -- have you verified that the value of "s" really is present in the list? did you really mean to remove "s" and not, say, "string" ? </F> -- http://mail.python.org/mailman/listinfo/python-list