sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11033
Re: [Question #199969]: Print the last 10 numbers, NEED A HELP !!!
Question #199969 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/199969
Status: Open => Answered
RaiMan proposed the following answer:
This was the answer to your question:
I have one problem, thats it, how get the last 10 numbers from each 1000 numbers.
range((1000-10), 1000)
returns a list, containing the numbers 990 ... 999
you can make a def(), that returns the last n numbers:
def last_numbers(from, n=10):
return range((from-n), from)
so
last_10_from_1000 = last_numbers(1000) # n=10 default
and
last_5_from_1000 = last_numbers(1000, 5)
To understand your workflow and problem, I have to look at your working
code, since in the above snippet, there are some failures and oddities.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.