I have a list of 2 types of customers classic customer and hipsters. I have a function associated to these classes which tells me if they are in budget. I would like to know if it still exist a hipster which is in budget. Something like, however the isinstance() return me a boolean.
any(isinstance(x, HipsterRecurrent).is_in_budget() for x in self.RecurrentCustomersList)
I succeed ! I did any(isinstance(x, HipsterRecurrent) and x.is_in_budget() == True for x in self.RecurrentCustomersList)