if event.type == pygame.MOUSEBUTTONDOWN: print event.button
event.button can equal several integer values:
1 - left click
2 - medium click
3 - right click
4 - scroll up
5 - scroll down
Instead of an event, you can also get the current state of the button:
pygame.mouse.get_pressed()
This returns a tuple:
(leftclick, middleclick, rightclick)
Each of them is a logical integer representing an up / down button.
source share