Ошибка индентации

код

import pyautogui
from time import sleep
import time

test = True
while test :

sleep ( 3 )
pyautogui.click ( 121, 89, duration = 1)
pyautogui.click ( 2179, 435, duration = 1 )
sleep ( 2 )
pyautogui.click ( 1311, 669, duration = 1 )
pyautogui.click ( 1698, 253, duration = 1 )

Ошибка:

File "test.py", line 12
    sleep ( 3 )
    ^
IndentationError: expected an indented block

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

Автор решения: Danis
import pyautogui
from time import sleep
import time

test = True
while test :

    sleep ( 3 )
    pyautogui.click ( 121, 89, duration = 1)
    pyautogui.click ( 2179, 435, duration = 1 )
    sleep ( 2 )
    pyautogui.click ( 1311, 669, duration = 1 )
    pyautogui.click ( 1698, 253, duration = 1 )

почитайте об отступах в Python

→ Ссылка