Tisbury Treasure Hunt, Task 5 Help

Hi All,

I am struggling to complete Task 5 in the subject exercise. Here is my code:

def clean_up(combined_record_group):
    clean_record = ''
    for record in combined_record_group:
        new_record = '('
        for index, item in enumerate(record):
            if index != 1: new_record += str(item) + ', '
        clean_record = new_record.strip(', ') + ')\n'
    return clean_record

And here is the error message I’m getting:

AssertionError: "(Silver Seahorse, Hidden Spring (Island 
of[28 chars]w)\n" != "('Scrimshawed Whale Tooth', 'Deserted 
Dock[874 chars]')\n"
Diff is 1089 characters long. Set self.maxDiff to None to see it.

Any hints or suggestions are greatly appreciated!


You may want to rely on Python to format (convert to a string) the data/tuple via the str() function.

Thanks Isaac! That was the hint I needed! I’m submitting the entire exercise now for review in case you’d like to see my ‘finished’ solution.