import pygame import os BASE_IMG_PATH = 'data/images/' def load_image(path): image = pygame.image.load(BASE_IMG_PATH + path).convert() image.set_colorkey((0,0,0)) return image def load_images(path): images = [] bilder = os.listdir(BASE_IMG_PATH + path) for image in bilder: images.append(load_image(path +"/" + image)) return images