Найти - Пользователи
Полная версия: Простите за глупый вопрос, : IndentationError: expected an indented block
Начало » Python для новичков » Простите за глупый вопрос, : IndentationError: expected an indented block
1
vorav
Добрый день,
Занимаюсь по книжке
Lutc_M._-_Izuchaem_Python_(4-e_izdanie)-_2011.pdf

Никак не получается сделать цикл, помогите студенту!

>>>
>>> for i in range(5):
… print(i);
File “<stdin>”, line 2
print(i);
^
IndentationError: expected an indented block
>>>
>>>
vorav
Точнее исходный код такой:

>>> for i in range(5):
… print(i)
File “<stdin>”, line 2
print(i)
^
IndentationError: expected an indented block

Версия питона 3.4
py.user.next
Надо перез print() поставить пару пробелов.
Firik
М - Магия
vorav
огромное спасибо, работает!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB