Build a Pin Extractor - Step 5

Tell us what’s happening:

This one seemed simple, but the console tells me that ‘lines’ is not defined. I don’t get it.

Your code so far

def pin_extractor(poem):
    secret_code = ''
    lines = poem.split('\n')

# User Editable Region

for line in lines:
    print(line)    

# User Editable Region


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

pin_extractor(poem)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15

Challenge Information:

Build a Pin Extractor - Step 5

What is wrong? I searched on the forum, and unless I am mistaken, people have used the same code as mine

Ok, I corrected the indentation

good job in figuring it out, yes, you need to keep writing inside the function

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.