newest questions tagged python - Stack Overflow
dictionary in pythons = problem.getSuccessors(currNode)
print s
child = dict((t[0], t[1:]) for t in s)
print child
output of s = [((5, 4), 'South', 1), ((4, 5), 'West', 1)]
output of child = {(4, 5): ('West', 1), (5, 4): ('South', 1)}
Why the order has been changed??...
python