- Strueture
for <var> in <sequences>:
<body>
- Structure
while <condition>:
<body>
- Infinite loop
- Interactive loops: allows the user to repeat certain portions of a program on demand.
- Sential loops: continues to process data until reaching a special value that signals the end.
- File loops
- Nested loops
- Boolean operator: '=='
<expr> and <expr>
<expr> or <expr>
- Boolean algebra
- Post-test loop: ex) input validation
- Loop and a half: loop exit is actually in the middle of the loop body.
- The logic of a loop is easily lost when there are multiple exits.
- Error case: 'while response[O] == "y" or "Y":'
- Python's Boolean operators are shortcircuit operators.
- Modal input: lock the user into a certain mode of interaction. <-> nonmodal(multimodal)
*** 이중 for 문 한 번에 break 깨기, is