Project Euler Problem 6: sum of squares and square of sums
This would be good practice for list comprehension, especially since sum() is a builtin function.

sequence = range(1, 11)
sum_of_squares = sum([i**2 for i in sequence])
square_of_sum = sum(sequence)**2
print(square_of_sum - sum_of_squares) # 2640


For even more fanciness, you can use this expression for the sum_of_squares:

sum_of_squares = sum(i**2 for i in sequence) # No square brackets


This sums over a generator expression instead of creating a new list, saving memory, especially if the sequence is something ridiculous like range(1, 1000000001).