2주차 - Day 4. Loops (break, continue, range, while, infinite, nested, list comprehension)
Break a Loop / Continue코드의 실행 순서가 바뀜자신을 감싸고 있는 루프의 {}괄호를 벗어남Break() is used to exit a for loop or a while loop# mango가 나오면 반복문 끝fruits=['apple', 'blueberries', 'mango', 'watermelon']for fruit in fruits: if fruit=="mango" break print(f"과일 : {fruit}") print("-"*20)print("끝") continue → mango skip루프의 처음 조건으로 돌아감Continue() is used to skip the current block, and return to the "for" or "whil..
2025. 10. 2.