Skip to main content
Skip table of contents

for

기능

range로 반복 범위를 설정하여 반복작업을 실행합니다.

문법

for <item> in <sequence형 객체 S>:

      <구문>

예제

PY
x=0
for i in range(0, 3): # i는 0 -> 1 -> 2 
x= x + 1 

sum = 0
for i in range(0, 10):
sum = sum + i
tp_log("sum = " + str(sum))
#expected result:
#sum = 45

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.