is_stop = False
for num in range(5):
print(f'{num} 문자 => {chr(num)}')
for value in range(num):
print('*' * value)
if value == 3:
is_stop = True
break
# 내부에 반복문이 중단되었다면 멈춰라.
if is_stop == True:
break
- break는 반복문을 중단시키기 때문에 break가 실행된다고 해서 if문이 종료되지 않고, 해당 반복문이 종료됨!