The output is in the form: - ((6,5), 'answer', 1)
I am creating a diet child ... in which (6,5) is the key and answer and 1 Values are the need to keep (6,5) key and answer as the direction .... and I add all values to If you want to add all the keys / values to a key while the loop is released
Want (and Even the keys are completely different):
for totaldict = {} ... whatever your loop is ...: ... totaldict.update (([t] [0] , T [1:]) for t) If you want a list of articles, then @an's answer is good. If you want a single word with the all specific keys, and the list of tuples corresponding to each key:
import archive totaldict = collections.defaultdict (list) For ... Whatever your loop is ...: ... in t: total [t [0]]. Annex (T [1:]) It may be that the meaning of the other senses means that you are to "keep all values of this dictatorship", but this is normal As it is possible, it is impossible to guess in the very meaning of what is possible, as possible.
Edit : By editing OP (clarifying his question, although there are many suspicious aspects, which I have previously mentioned about some of my earlier questions ), They do not necessarily have < a word - any way behind when it eventually goes to a node which is a solution " "(Or" target ").
Editing in the OQ now disappears mysteriously It is happening, but I am F (as I am remembering) that he is leaving any node which is first pushed to the stack, then one word is the same, because every node will be seen at one time ( Therefore no duplicate key) - However , the entry of that directory, with the node in the form of a key, the successors of the node (indicator in the trailing behind the target is useless ) !, but previous The node entry of the root must be empty (because there is no predecessor in it) to visit this node (and the instructions taken from that immediate predecessor to come to this node).
Comments
Post a Comment