def getRandomPipe():
 gapYs = [20, 30, 40, 50, 60, 70, 80, 90]
 index = random.randint(0, (len(gapYs) - 1))
 gapY = gapYs[index]
 gapY += int((BASEY * 0.2))
 pipeX = (SCREENWIDTH + 10)
 return [{'x': pipeX, 'y': (gapY - PIPE_HEIGHT)}, {'x': pipeX, 'y': (gapY + PIPEGAPSIZE)}]

def getRandomPipe ( ) : gapYs = [ 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 ] index = random . randint ( 0 , ( len ( gapYs ) - 1 ) ) gapY = gapYs [ index ] gapY += int ( ( BASEY * 0.2 ) ) pipeX = ( SCREENWIDTH + 10 ) return [ { 'x' : pipeX , 'y' : ( gapY - PIPE_HEIGHT ) } , { 'x' : pipeX , 'y' : ( gapY + PIPEGAPSIZE ) } ]
returns a randomly generated pipe .