Flask app question 12

  • 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.

1 Like

4 posts were merged into an existing topic: Adapt a pet / step 12