# Build a Pin Extractor - Step 14

**URL:** <https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [September 15, 2026, 9:27am UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244 "2026-09-15T09:27:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pztk.org](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pztk.org/32/421266_2.png) [@pztk.org](https://forum.freecodecamp.org/u/pztk.org)\
**Post date:** [September 15, 2026, 9:27am UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244/1 "2026-09-15T09:27:39Z")

</div>

### Tell us what’s happening:

i dont seem to understand this question, i am lost and confused.

### Your code so far

```py
def pin_extractor(poem):
    secret_code = ''
    lines = poem.split('\n')
# User Editable Region
    for line_index, line in enumerate(lines):
        words = line.split()
        secret_code += str(len(words[line_index]))
# User Editable Region
        

poem = """Stars and the moon
shine in the sky
white and bright
until the end of the night"""

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`

### Challenge Information:

Build a Pin Extractor - Step 14

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

GitHub Link: [freeCodeCamp/curriculum/challenges/english/blocks/workshop-pin-extractor/6855918e87c33c6979d21d3f.md at main · freeCodeCamp/freeCodeCamp · GitHub](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/workshop-pin-extractor/6855918e87c33c6979d21d3f.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 15, 2026, 1:59pm UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244/2 "2026-09-15T13:59:50Z")

</div>

Hi @pztk.org,

Try adding some `print` functions inside your loop to help you understand what this code is doing:

```auto
print(line_index, line)
print(words)
print(len(words[line_index]))

```

Happy coding

---

<div class="post-metadata">

**Author:** ![pztk.org](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pztk.org/32/421266_2.png) [@pztk.org](https://forum.freecodecamp.org/u/pztk.org)\
**Post date:** [September 16, 2026, 6:51am UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244/3 "2026-09-16T06:51:08Z")

</div>

i can do that xD haha thanks im gonna give it a try

---

<div class="post-metadata">

**Author:** ![pztk.org](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pztk.org/32/421266_2.png) [@pztk.org](https://forum.freecodecamp.org/u/pztk.org)\
**Post date:** [September 16, 2026, 7:19am UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244/4 "2026-09-16T07:19:29Z")

</div>

so when i print(line\_index) it gives me the number of the lines. when i add print(line\_index, line) it gives me the actual lines of the poem. what is confusing me is that enumerate lines in line. yet the “line\_index” is the one that is the one that is doing the numbering for the lines. so if i would translate the code into a sentence it would be:  
create a line\_index from lines and enumerate them and add the lines to the variable “line” placing them next to the numbers?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [September 16, 2026, 9:08am UTC](https://forum.freecodecamp.org/t/build-a-pin-extractor-step-14/800244/5 "2026-09-16T09:08:02Z")

</div>

> [@pztk.org](#):
>
> `for line_index, line in enumerate(lines):`

`enumerate` gives for each item in `lines` both the index, which goes in `line_index` and the line itself that goes in `line`
