Python 当一个指示灯不存在时,使插槽中继所有信息

Python 当一个指示灯不存在时,使插槽中继所有信息,python,python-3.x,python-requests,Python,Python 3.x,Python Requests,因此,如果不满足条件,我想运行代码 因此,我首先通过获取值(指标dest和日期)来打开它 然后我做了一个变量来简化输入 mapped_indicator = self.response.slots.get_slot_values('indicator_dest')[-1] 现在是这样 if mapped_indicator == 'Recoveries':

因此,如果不满足条件,我想运行代码

因此,我首先通过获取值(指标dest和日期)来打开它

然后我做了一个变量来简化输入

mapped_indicator = self.response.slots.get_slot_values('indicator_dest')[-1]
现在是这样

                                               if mapped_indicator == 'Recoveries':
                            recoveries_list = [{'total_recoveries': indicator_grab[0].get('recovered'),
                                                'new_recoveries': indicator_grab[0].get('new_recoveries')}]
                            self.response.slots.set('recoveries', CompetencySlot.of(recoveries_list))

                        if mapped_indicator == 'Isolated':
                            self.response.slots.set('isolated_cases', CompetencySlot.of(indicator_grab[0].get('isolation')))

                        if mapped_indicator == None:
                            self.response.slots.set('Date_Range', CompetencySlot.of(response))
现在所有的值都会有一个日期,我想要的是,如果没有映射的_指标,它只是传递该日期的所有信息

我试过了

 if mapped_indicator == None:
                            
但是都不行,你知道我能用什么吗

 if mapped_indicator == None:
                            
 if mapped_indicator == "":
                            
 if No mapped_indicator:
                            
 else:
                            
 elif: