Python

파이썬 반복문 (Loop) break

K2ODING 2021. 11. 14. 18:03
728x90

BREAK A LOOP/CONTINUE

코드 실행 순서를 바꿔보자

  • 자신을 감싸고 있는 루프의 { } 괄호를 벗어난다. break() is used to exit a for loop or a while loop
  • 루프의 처음 조건으로 돌아간다. continue() is used to skip the current block, and return to the "for" or "while" statement.