<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def diff(self, n):
 """Print the differences between the two files """

        if os.path.isfile(n[:-4]):
            diff1 = Utils().read_file(n[:-4]).splitlines()
        if os.path.isfile(n):
            diff2 = Utils().read_file(n).splitlines()
        lines, l, c = [], 0, 0
        for a, b in itertools.izip_longest(diff1, diff2):
            l += 1
            if a != b:
                for s1, s2 in itertools.izip_longest(str(a), str(b)):
                    c += 1
                    if s1 != s2:
                        break
                print("@@ -{0},{1} +{2},{3} @@\n".format(l, c, l, c))
                for line in lines[-3:]:
                    print("{0}".format(line))
                if a is None:
                    a = ""
                print("{0}{1}{2}{3}".format(self.red, "-", self.endc, a))
                if b is None:
                    b = ""
                print("{0}{1}{2}{3}".format(self.green, "+", self.endc, b))
                lines = []
                c = 0
            else:
                lines.append(a)