If anyone knows how to do a list comprehension of this, please do let me know!~ Right now I am trying to extract only the IDs into a list. The method I'm using now is a for loop, just wondering if there is a way to do a list comprehension?
pets = [
{"id": 1, "name": "Nelly", "age": "5 weeks", "bio": "I am a tiny kitten rescued by the good people at Paws Rescue Center. I love squeaky toys and cuddles."},
{"id": 2, "name": "Yuki", "age": "8 months", "bio": "I am a handsome gentle-cat. I like to dress up in bow ties."},
{"id": 3, "name": "Basker", "age": "1 year", "bio": "I love barking. But, I love my friends more."},
{"id": 4, "name": "Mr. Furrkins", "age": "5 years", "bio": "Probably napping."},
]
pet_ids = []
for pet in pets:
pet_ids.append(pet["id"])