def highlight_line(self, payload):
        """
        :type payload: str
        :param payload: string to highlight, on chosen line
        """
        index_of_payload = self.target_line.lower().index(payload.lower())
        end_of_payload = index_of_payload + len(payload)

        self.target_line = u'{}{}{}'.format(
            self.target_line[:index_of_payload],
            self.apply_highlight(self.target_line[index_of_payload:end_of_payload]),
            self.target_line[end_of_payload:],
        )

        return self
def highlight_line ( self , payload ) : index_of_payload = self . target_line . lower ( ) . index ( payload . lower ( ) ) end_of_payload = index_of_payload + len ( payload ) self . target_line = u'{}{}{}' . format ( self . target_line [ : index_of_payload ] , self . apply_highlight ( self . target_line [ index_of_payload : end_of_payload ] ) , self . target_line [ end_of_payload : ] , ) return self
:type payload: str
        :param payload: string to highlight, on chosen line