code: def sollen(tex, command):
      r
      return sum(len(a.string) for a in TexSoup(tex).find_all(command))
docs: r"""Measure solution length
  
      :param Union[str,buffer] tex: the LaTeX source as a string or file buffer
      :param str command: the command denoting a solution i.e., if the tex file
          uses '\answer{<answer here>}', then the command is 'answer'.
      :return int: the solution length