Note that sum(d) will generate a huge number, possibly using lots of memory and processing power. A better option would be:
def main(filename):
d = open(filename, 'rb').read()
result = reduce(lambda i, j: (i + j) % 256, d)
print("The answer is: ", result)
Note how this is similar to the squaring algorithm used in cryptography: http://en.wikipedia.org/wiki/Exponentiation_by_squaring