■ for 문 형식
for i in 리스트:
예를 들어,
for i in [1,2,3,5,6,100]:
사실 list 뿐만 아니라 dict, set, str, bytes, tuple, range 등 모든 iterable한 타입은 가능하다.
'python > uncategorized' 카테고리의 다른 글
반복에 대한 효율성 비교 (0) | 2021.04.18 |
---|---|
fstring과 %의 효율성 비교 (0) | 2021.03.14 |
python 여러 변수 형 변환하기 (0) | 2021.02.18 |
python stringtobinary binarytostring (0) | 2020.11.29 |
exit()도 raise한다 (0) | 2020.11.14 |
댓글