I created a small example to explain:
import pygame pygame.init() class Player(pygame.sprite.Sprite): def __init__(self, color): super().__init__