---
id: 68559f3561d7df287586142e
title: Step 16
challengeType: 20
dashedName: step-16
---

# --description--

Now the pin extractor works, but it could be more efficient! It could extract the pin from many poems at the same time!

Add two more poems in the global scope, `poem2 = 'The grass is green\nhere and there\nhoping for rain\nbefore it turns yellow'` and `poem3 = 'There\nonce\nwas\na\ndragon'`, and for now, comment out the `print` with the call to `pin_extractor`.


# --hints--

The variables `poem2` and `poem3` should exist and have the correct value.

```js
({
    test: () => runPython(`
        assert _Node(_code).has_variable('poem2')
        assert _Node(_code).has_variable('poem3')
        assert _Node(_code).find_variable('poem2').is_equivalent("poem2 = 'The grass is green\\\\nhere and there\\\\nhoping for rain\\\\nbefore it turns yellow'")
        assert _Node(_code).find_variable('poem3').is_equivalent("poem3 = 'There\\\\nonce\\\\nwas\\\\na\\\\ndragon'")
    `)
})
```

You should comment out the `print(pin_extractor(poem))` call.

```js
({
    test: () => runPython(`
        assert not _Node(_code).has_call('print(pin_extractor(poem))')`)
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
def pin_extractor(poem):
    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'
    return secret_code

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

print(pin_extractor(poem))
--fcc-editable-region--

```
