Question: pygame how to set background image?
Answer: Some times, you want to put a background image to the gaming window. ... 
Step 1: Load the image.
background_image = pygame.image.load("ocean.png")
'pygame. ... 
file name is full path of file name to load.
load(fileobj, namehint=””)
You can load the file by passing as python file-like object.