Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 4baedc7

Browse files
committed
Extended else statement section
Signed-off-by: Serhii Horodilov <sgorodil@gmail.com>
1 parent 45aade5 commit 4baedc7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/basics/controlflow.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ code will be executed only that the ``if`` statement truth check fails.
7373
else:
7474
print(number, "is odd")
7575

76+
You can attach **only one** else block to **if statement**. And you cannot use
77+
``else`` statement on its own - this will cause *SyntaxError*.
78+
7679
``elif`` block(s)
7780
-----------------
7881

0 commit comments

Comments
 (0)