How can I shorten this paint program?
Here's my best effort (8 lines):

from pygame import *
init()
screen = display.set_mode((1000,720))
for e in iter(event.wait, event.Event(QUIT)):
    col = {(1, 0, 0): 'white', (0, 0, 1): 'black'}.get(mouse.get_pressed())
    if col and e.type in (MOUSEBUTTONDOWN, MOUSEMOTION):
        display.update(screen.fill(Color(col), Rect(mouse.get_pos(), (20, 20))))
quit()


Notes:


from module import * is normally deprecated because you don't know all the names you're importing, and some of these might conflict with or shadow names from other modules. But in simple cases like this, with no other dependencies, it's justified because it results in code that's easy to read. You can always go through and change X to pygame.X if you want.
In this program there's nothing that animates, so there's no need for a clock, and the display only needs to be updated when it changes.
You didn't post your images brush.jpg and white.png so I've used solid colour rectangles. (Also, why a JPEG? JPEGs are lossy, so not appropriate for bitmap graphics.)
By changing the program to draw white-on-black I can avoid the initial screen.fill and save a line.
I've used colour names 'white' and 'black' which are clearer than RGB tuples like (255, 255, 255).
I've used the two-argument form of iter to avoid the test for event.type == QUIT. (This feature is useful when you want to exit an iteration on a special value.)
By using event.wait instead of event.get I can reduce the two loops to one.
I've changed the user interface so that the left mouse button draws and the right mouse button erases. This is done by looking up the tuple returned by mouse.get_pressed in a dictionary, to get the colour for the fill.
Surface.fill returns the rectangle that was filled, which is exactly the part of the display that needs to be updated, so I can pass it directly to display.update.