Skip to content

Commit 2ce3eb2

Browse files
author
boraxpr
committed
bite 214
1 parent 210a5a9 commit 2ce3eb2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

214/countdown.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ def countdown():
22
"""Write a generator that counts from 100 to 1"""
33
num = 100
44
while True:
5-
yield num
6-
num -= 1
7-
if num < 1 or num > 100:
8-
raise StopIteration
9-
10-
11-
12-
5+
yield num
6+
num -= 1
7+
if num < 1:
8+
raise StopIteration

0 commit comments

Comments
 (0)