I currently have this in my Python script which is scheduled to run every 30s:
import random 
myList = ["12345", "123456", "1234567", "12345678"]
mySelection = random.choice(myList)
However, I'm looking for a solution that will select item from the list not randomly but in an order of the list items each time script runs (each 30s). For example:
- my.py runs for the first time and mySelection= "12345"
- my.py runs for the second time and mySelection= "123456"
- my.py runs for the third time and mySelection= "1234567"
- my.py runs for the fourth time and mySelection= "12345678"
- my.py runs for the fifth time and mySelection= "12345" - this is when it starts over from the beginning of the list.
- and so on...
Could someone help with this?
 
     
     
    