Can somebody help me? It says that “Inside the loop you should have secret_code += str(len(words[line_index])), and you should remove print(str(len(words[line_index]))).” I clearly don’t have that print call in my code, so idk what is going on.
Your code so far
def pin_extractor(poem):
lines = poem.split('\n')
for line_index, line in enumerate(lines):
print(line_index, line)
# User Editable Region
words = line.split()
secret_code += str(len(words[line_index]))
# 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/27.0.1 Safari/605.1.15
Challenge Information:
Build a Pin Extractor - Step 11