<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def beginning_of_line(self):
 r""" Return true if the scan pointer is at the beginning of a line. True 2 False 3 True True """

        if self.pos > len(self.string):
            return None
        elif self.pos == 0:
            return True
        return self.string[self.pos - 1] == '\n'