٩(๑•̀o•́๑)و

break, continue 본문

Python

break, continue

11mia 2020. 9. 9. 02:23
i = 0

while True:
    i += 1
    if i == 10:
        break
    elif i % 2 == 0:
        continue
    print(i)
    
====Result====
1
3
5
7
9

'Python' 카테고리의 다른 글

map  (0) 2020.09.10
list  (0) 2020.09.09
while  (0) 2020.09.09
for  (0) 2020.09.09
if, elif, else  (0) 2020.09.09