← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #163440]: i want to repeat my loop

 

Question #163440 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/163440

RaiMan proposed the following answer:
@ Willie:
for i in range(n):
will loop exactly n times beginning with 0 and ending with n-1

This corresponds with the fact that list indexing (arrays) starts with
0:

a = [1,2,3,4] # a list
for i in range(len(a)):
    print "a[%d] = %d"%(i, a[i])"

@ aaysh
look here: faq 1437
[HowTo] repeat something in a Sikuli script (make loops)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.