I want to write a function that prints a sum : I just started python a few weeks ago and I want to write a function that opens a file, counts and adds up the characters in each line and prints that those equal the total number of characters in the file.

For example, given a file test1.txt:

lineLengths('test1.txt')

The output should be:
15+20+23+24+0=82 (+0 optional)

This is what I have so far:

    def lineLengths(filename):
         f=open(filename)
         lines=f.readlines()
         f.close()

         answer=[]
         for aline in lines:
             count=len(aline)

It does what I want it to do, but I don't know how include all of the numbers added together when I have the function print.