# Build a Pin Extractor - Step 17

**URL:** <https://forum.freecodecamp.org/t/build-a-pin-extractor-step-17/800352>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [September 16, 2026, 12:06pm UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-17/800352 "2026-09-16T12:06:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ice\_cream](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ice_cream/32/408628_2.png) [@Ice\_cream](https://forum.freecodecamp.org/u/Ice_cream)\
**Post date:** [September 16, 2026, 12:06pm UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-17/800352/1 "2026-09-16T12:06:13Z")

</div>

### Tell us what’s happening:

Hi I really don’t understand what’s wrong with my code. I think I have already done what they ask me to do

### Your code so far

```py
# User Editable Region
def pin_extractor(poems):
    for poem in poems:
        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)
poem = """Stars and the moon
# User Editable Region
shine in the sky
white and
until the end of the night"""

poem2 = 'The grass is green\nhere and there\nhoping for rain\nbefore it turns yellow'
poem3 = 'There\nonce\nwas\na\ndragon'

# print(pin_extractor(poem))

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36 Edg/153.0.0.0`

### Challenge Information:

Build a Pin Extractor - Step 17

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/python-v9/workshop-pin-extractor/step-17)**
>
> Learn to Code for Free

GitHub Link: [freeCodeCamp/curriculum/challenges/english/blocks/workshop-pin-extractor/68599f0fc7479410b2269742.md at main · freeCodeCamp/freeCodeCamp · GitHub](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/workshop-pin-extractor/68599f0fc7479410b2269742.md)

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [September 16, 2026, 1:23pm UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-17/800352/2 "2026-09-16T13:23:23Z")

</div>

Welcome to the forum @Ice_cream,

Please reset this step and try again. Be sure to put ALL of the existing code inside the `for` loop (the `return` code is missing from yours) and keep the existing indentation.

Happy coding
