My name’s Henry and I’m currently stumped on the final task of “Tisbury Treasure Hunt”.
The thing is: I don’t really know where to start on this one. Here’s what I understood so far:
The basic task: compare the items in the tuple with each other and throw out any information that is in there more than once (i.e. the coordinates, which are always twice).
The task wants me to use for (for-)loops to iterate over the nested tuples.
Here’s what stumped me:
I don’t know where to start since having three brackets for two nested tuples makes it kind of hard to know how to build a proper loop to iterate over the “correct” tuple.
While I do know how to compare items of tuples, I also know that Tuples are immutable, making it impossible to “throw out” singular items as well as simply creating a new tuple and adding in all the necessary information while iterating over a tuple (compared to adding items to an “empty list”).
Is there any way to help me popping the knot in my brain? Please don’t just give me the solution, I am genuinley trying to solve this my own way instead of just copying an answer.
This one is sorta hard to hint at, so I am going to go with one directive, and one hint.
Hint:We are not asking you to compare anything here. Rather, we are asking you to extract information and build results from it.
All the information and techniques you need to complete this task were covered in the introduction to the exercise, or in the introductions of exercises that come before this exercise. The nested nature of the input is a bit of a Red Herring for looping. If you loop over the input data, you will get the following:
@BethanyG I didn’t have a chance to fully commit myself to this task again yet, but the hint alone is pure gold and helped me to fully grasp where to start, where my train of thought went off-track and how to tackle the challenge. Thank you very much!!