I am trying to make pygame draw a shape from a list of shapes imported with fileIO but i get a pygame import error please help
import random
import pygame
w = 640
h = 480
x = open("shapes.txt")
z = x.readlines()[n]
n = random.randrange(6)
screen = pygame.display.set_mode((w, h))
pygame.draw.z(screen, (random.randrange(255), random.randrange(255), random.randrange(255)), (random.randrange(640), random.randrange(480)), 50 )
for event in pygame.event.get():
if event.type == QUIT:
exit()
this is my my "shapes.txt"
circle
rect
line
line
rect
circle