code: def _pop_digits(char_list):
      
      logger.debug('_pop_digits(%s)', char_list)
      digits = []
      while len(char_list) != 0 and char_list[0].isdigit():
          digits.append(char_list.pop(0))
      logger.debug('got digits: %s', digits)
      logger.debug('updated char list: %s', char_list)
      return digits
docs: Pop consecutive digits from the front of list and return them
  
      Pops any and all consecutive digits from the start of the provided
      character list and returns them as a list of string digits.
      Operates on (and possibly alters) the passed list.
  
      :param list char_list: a list of characters
      :return: a list of string digits
      :rtype: list