Как ускорить запись переменных?

Как ускорить запись переменных button ?

while True:
        pda.press('e')
        button_left = pga.locateOnScreen(path_left, confidence=0.8)
        if button_left is None:
            pga.keyDown('left')
        button_right = pga.locateOnScreen(path_right, confidence=0.8)
        if button_right is None:
            pga.keyDown('right')
        button_down = pga.locateOnScreen(path_down, confidence=0.8)
        if button_down is None:
            pga.keyDown('down')
        button_up = pga.locateOnScreen(path_up, confidence=0.8)
        if button_up is None:
            pga.keyDown('up')

Ответы (0 шт):