import random
j = [10, 20, 30]
def generateNum(j, minNum, maxNum):
generatedList = []
for x in range(minNum, maxNum):
if x not in j:
generatedList.append(x)
num = random.choice(generatedList)
return num
generateNum(j, 1, 40)
if keys[pg.K_SPACE] and not man.isJump:
man.isJump = True
man.left = False
man.right = False
man.walkCount = 0
man.left = False
man.right = False
man.walkCount = 0