我正在尝试按名称返回列表

时间:2019-07-07 13:47:48

标签: python-3.x list

我有一个字典列表,我从中使用关键字将它们转储到适当的列表中。

我尝试使用输入来执行此操作,但控制台仅返回我编写的内容。 但是,如果我写print('list_name')的话,那就没问题了。

$('#multiple-select-field1').chosen({ /// use Id of the element
    max_selected_options: 5,    /// change this value 
    allow_single_deselect: true,
    width: '100%'
}); 

 $('#multiple-select-field2').chosen({ /// use Id of the element
    max_selected_options: 6, /// change this value 
    allow_single_deselect: true,
    width: '100%'
  });

  $('#multiple-select-field3').chosen({ /// use Id of the element
    max_selected_options: 7, /// change this value 
    allow_single_deselect: true,
    width: '100%'
 });

..向下到生物[5] ..

creatures = []  

creatures.append({})  

creatures[0]['food_type'] = 'herbivore'  
creatures[0]['brushes'] = 'hooves_paired'  
creatures[0]['nature'] = 'tamable'  

creatures.append({})

creatures[1]['food_type'] = 'carnivore'  
creatures[1]['brushes'] = 'paws'  
creatures[1]['nature'] = 'untamable'  

这些是排序条件

these are lists where sorted creatures go

herbivores = []  
omnivores = []  
carnivores = []  
with_paws = []  
with_tentacles = [] 
with_hooves_paired = []  
with_hooves_unpaired = []  
with_fins = []  
tamable = []  
untamable = []  

我希望通过仅插入列表名称来获得例如食肉动物的列表。

0 个答案:

没有答案