I am writing a pygame program that has a moving background which is a sprite. I was wondering if/how you can make sprites appear on top of others (some kind of priority in what appears on top of what). I know the order they appear on top of one another is based on which one is added to the screen first but I am wondering if I can change this.


the first sprite you create will be put on the base.
any sprites put on after this will go on top

screen.blit(background, (300, 300))
screen.blit(smilie, (450, 300)) #This sprite will be on top as i blitted it last