Given County, State return the SAME code for specified location. Return False if not found

def lookup_samecode(self, local, state):
        """Given County, State return the SAME code for specified location. Return False if not found"""
        for location in self.samecodes:
            if state.lower() == self.samecodes[location]['state'].lower():
                if local.lower() == self.samecodes[location]['local'].lower():
                    return self.samecodes[location]
        return False