Hello fellow learners, and cohorts I hope you are having a great day. I am currently trying to solve the
Adopt a Pet project from my skill path : Web apps with Flask.
Within that project, there is a step with following instructions:
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. If you run your code and navigate to each animal page, you can see a bulleted list of available pets!
And Here is my code so far…
It is expected to have a unordered bullet list of names of pet from each category but instead I am getting only one name printed instead of three.
I would be grateful if someone could help me because I am stuck.