'Shapes that can be interacted with in python

Within a game I'm making a need to let the user create a sequence of circles of different colours, in order to do this I need the circles to be dragged and dropped by users into a sequence and, once they get close to one of the positions for a circle 'click' into place. Is there anyway way of doing this in Pygame?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source