Sum Square Difference, which way is more Pythonic?
I would do something like:

def sum_of_squares(n):
    return sum(i ** 2 for i in range(1, n+1))

def square_of_sum(n):
    return sum(range(1, n+1)) ** 2

def sum_square_difference(n):
    return sum_of_squares(n) - square_of_sum(n)


Notice the use of a generator expression in sum, where I have omitted the square brackets.