Python/기초 강의
반복문
개발게발
2022. 7. 21. 00:37
1. while
while <조건문>:
<수행할 문장1>
<수행할 문장2>
<수행할 문장3>
....

2. for
for 변수 in 리스트(또는 튜플, 문자열):
수행할 문장1
수행할 문장2
수행할 문장3
....



리스트 내포(List comprehension)
- 기존 for문

- 리스트 내포

출처 : https://www.youtube.com/watch?v=DEDENmlT2o0&list=PLU9-uwewPMe2AX9o9hFgv-nRvOcBdzvP5&index=6&t=18s