# break a loop / continue
# 자신을 감싸고 있는 루프의 { } 괄호를 벗어난다. break() is used to exit a for loop or a while loop
# 루프의 처음 조건으로 돌아간다. continue() is used to skip the current block, and return to the "for" or "while" statement.
# range 함수
#range() 함수는, 숫자 리스트를 만들어 준다.
#range() 함수는, 인덱스가 0 부터 시작한다.
#레인지의 괄호 안에 적는 숫자 갯수만큼 만든다.
#Example: range(0, 10) generates integers from 0 up to, but not including, 10.
# While Loops
# while loop 는 조건식을 만족하는 동안
# 자신이 포함하는 문장들을 실행한다.
'Python 문법' 카테고리의 다른 글
Python 문법 -functions, lambda, def (0) | 2022.04.26 |
---|---|
Python 문법 - infinite loop, nested loops (0) | 2022.04.25 |
Python 문법- Loop, enumerate, keys, values, items (0) | 2022.04.25 |
Python - 반복문 Loop, for (0) | 2022.04.25 |
Python 조건문 -if, elif, else (0) | 2022.04.21 |