我有这段代码:
charlie = {"animal_kind":"german shepherd","owner's_name":"cory", }
lucy = {"animal_kind":"cat", "owner's_name":"oliver"}
george = {"animal_kind":"ferret", "owner's_name":"stephy"}
pets = [charlie, lucy, george]
我想遍历每个字典并打印字典的名称(而不是字典中的键或值)。 有没有办法做到这一点?