def move_items(self, from_group, to_group):
        """Take all elements from the from_group and add it to the to_group."""
        if from_group not in self.keys() or len(self.groups[from_group]) == 0:
            return

        self.groups.setdefault(to_group, list()).extend(self.groups.get
                                                        (from_group, list()))
        if from_group in self.groups:
            del self.groups[from_group]
def move_items ( self , from_group , to_group ) : if from_group not in self . keys ( ) or len ( self . groups [ from_group ] ) == 0 : return self . groups . setdefault ( to_group , list ( ) ) . extend ( self . groups . get ( from_group , list ( ) ) ) if from_group in self . groups : del self . groups [ from_group ]
Take all elements from the from_group and add it to the to_group.