Build a Pin Extractor - Step 17

Tell us what’s happening:

I need help I’m stuck on the last process any hints would be helpful.

Your code so far


# User Editable Region

def pin_extractor(poems):
    for poem in poems:
        # Moved the existing body of the function into this new for loop
        secret_code = ''
        lines = poem.split('\n')
        for line_index, line in enumerate(lines):
            words = line.split()
            if len(words) > line_index:
                secret_code += str(len(words[line_index]))
            else:
                secret_code += '0'
        print(secret_code)


# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Build a Pin Extractor - Step 17

Can you please try to talk about how you’re stuck fixing the Step? What debugging did you do? What does the error message say?

You nested the exisiting code inside the for loop correctly but you also modified one of the lines of the function body.

Can you specify the area that needs changing on my script?

I would try resetting the Step and making zero changes other than what the instructions say.

What’s the idea behind not saving peoples process for looking back at theirv work anyways? Completed tasks and other things?

The amount of data storage needed to save everything every single camper types is unworkable. The storage costs would bankrupt freeCodeCamp.