Tell us what’s happening:
I need help I’m stuck on the last process any hints would be helpful.
Your code so far
# User Editable Region
def pin_extractor(poems):
for poem in poems:
# Moved the existing body of the function into this new for loop
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)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Challenge Information:
Build a Pin Extractor - Step 17