[Solved] How to blit a random image from a list Pygame [duplicate]


You must first import random. To choose your image, do image = math_list.pop(random.randint(0,len(math_list)-1)). randint is used to choose a random number from 0 to 4, each one corresponding to an item in the list. pop removes that item and returns it to image.

8

solved How to blit a random image from a list Pygame [duplicate]