So I got my question answered on how to find the minimum value, but what if I want the minimum object? Can we similarly simplify this code?
min = 9999
minChild = None
for child in currentRoot.children:
if child.score < min:
min = child.score
minChild = child
recurseWriteBook(child, depth+1)
Aucun commentaire:
Enregistrer un commentaire