728x90 반응형 loop2 [Python] else: break checker 반복문에서 else는loop 가 break로 끝나지 않을 경우 수행되는 code block을 지정.조건문에서 else일반적으로 else의 경우, 앞서의 if 와 elif문들에서 실행된 block이 없는 경우 수행되는 것을 의미한다.2023.07.28 - [Python] - [Python] if, elif, else statements [Python] if, elif, else statementsif, elif, else statements (조건분기문)프로그램의 flow control를 담당함. (loop문과 함께)Flow control을 위한 Control Structures에 대한 내용은 다음 URL을 참고.http://ds31x.blogspot.com/2023/07/basic-control-stru.. 2023. 9. 18. [Python] while statement, break and continue Python의 경우, loop structure로 while statement와 for statement를 제공한다.Contol Flow와 Control Structure에 대한 개념은 다음 URL을 참고 :http://ds31x.blogspot.com/2023/07/basic-control-structures-and-control.html참고로 do-while statement 는 while statement 만으로도 구현가능하기 때문에 Python에선 지원하지 않음. for statement가 iterator object와 함께 사용되는 것과 달리,while statement는 if statement와 매우 유사한 구조로 repetition을 가능하게 함.일반적인 구조.while condition: .. 2023. 7. 28. 이전 1 다음 728x90 반응형