Tell us what’s happening:
Really getting stuck here, cannot move on, what should I do?
Your code so far
# User Editable Region
def pin_extractor(poem):
secret_code = ''
lines = poem.split('\n')
for line_index, line in enumerate(lines):
# User Editable Region
words = line.split()
secret_code += str(len(words[line_index]))
# User Editable Region
if len(words) > line_index:
pass
return secret_code
poem = """Stars and the moon
shine in the sky
white and bright
until the end of the night"""
print(pin_extractor(poem))
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.251 Safari/537.36 UOS Professional
Challenge Information:
Build a Pin Extractor - Step 14