Adapt a pet / step 12

Hello Everyone,
I am stuck on step 12
any help would be appreciated

  • Inside the animals() function, you’ll be modifying html to display the names of all available pets that are of pet_type .

Right before the return statement, create a for loop that iterates over each element in the list of pets. You can access the appropriate list of pets in the pets dictionary by the key, pet_type . Inside the loop, create a <li> element for each pet’s name and concatenate the string to html .

Then, make sure to concatenate the opening <ul> tag to html before the loop and the closing </ul> tag after the loop, such that the <li> elements would be nested inside the <ul> element.

Did you miss asking a question?

Adapt a pet step 12, i am having problem

def index():
return f’’‘

Adapt a Pet!

Browse through the links below to find your new furry friend:


def animals(pet_type):

List of {pet_type}

for pet_type in pets:
html += “

    html +=’
  • ’+pets[pet_type]+’

  • html += “

return html

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