Tell us what’s happening:
I failed to put the words variable inside the loop. Failed test. Print job executed. Please comment.
Your code so far
# User Editable Region
def pin_extractor(poem):
secret_code = ''
lines = poem.split('\n')
for line in lines:
print(line)
for line in lines:
words=line.split()
if words:
word=('\n')
print(words)
poem = """Stars and the moon
shine in the sky
white and bright
until the end of the night"""
pin_extractor(poem)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0
Challenge Information:
Build a Pin Extractor - Step 6