<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chars(self):
 """ Return the number of characters of the text fragment, not including the line separators. :rtype: int """

        if self.lines is None:
            return 0
        return sum([len(line) for line in self.lines])