i'm portuguese, so sorry my english.
iḿ new programming in python so
this is my code:
for i in range(1, len(root)):
if dtResult.has_key(root[i]):
if dtResult[root[i]].has_key(path[i]):
dtResult[root[i]][path[i]] += 1
else:
dtTemp = {}
dtTemp[path[i]] = 1
dtResult[root[i]].update(dtTemp)
else:
dicTemp = {}
dicTemp[path[i]] = 1
dtResult [root[i]]=dicTemp
so i have an error: list index out of range on line 3 and i dont know why...
any body can give me a hand?
thanks
MOD EDIT: Added code tags. When posting code...USE CODE TAGS!!! ESPECIALLY IN PYTHON!
This post has been edited by JackOfAllTrades: 04 September 2012 - 03:38 AM

New Topic/Question
Reply



MultiQuote





|