条件 使用orm查询查询结果为列表 需求 只需要一个特定的值 response = self.get('/xxx/xxx/xxx/') # 此处结果为列表 data = response.data targets = [x for x in data if x['z'] == "xxx"] logging.info(targets[0]) 使用列表操作加快语句执行速度