Hi, There is a code in my main function which is something like:
while prunedFinal != []: prunedNew = genColocations(prunedK) *** tableInstancesNew = genTableInstances(prunedNew,tableInstancesK) tiCountDict = tiCount(tableInstancesNew) tiDict = findPI(tableInstancesNew) prunedFinal = pruneTI(tiDict,pi) rulesDict = genRules(prunedFinal) cpDict = findCP(rulesDict) prunedRulesList = pruneCP(cpDict,cp) prunedK = prunedFinal tableInstancesK = tableInstancesNew else: return prunedRulesList prunedK and tableInstancesK are defined in the main function. Before the main function, i have defined the other functions such as genColocations,genTableInstances,etc. Output of genColocations is to be given to the next function genTableInstances,output of this function to tiCount and findPI, and so on. However i am getting an error at the line marked with ***. 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 Could anyone enlighten me as to why i'm getting these two errors?? Thanks a lot, girish -- http://mail.python.org/mailman/listinfo/python-list