Junilu Lacar wrote:
Akrep Kral wrote:when we print this" print(firstKey({3:4, 5:-1, 1:2, 2:3, 4:5})) " , the answer needs to come to (5, -1) ?
No. That would be the exact opposite of what is being asked.
Junilu Lacar wrote:Study this part of the question very carefully: "The function must return the (key,value) tuple for the first key in the chain. For the above example, your function must return (1,2), because no other key has value 1."
It gives you an idea of what you're looking for in order to determine which is the first key in the chain.
Campbell Ritchie wrote:Please show us what you tried, even if it was unsuccessful.