Im trying to every nth item from a list.
As below "tags2" is the list I want to add every 4th item to the list "addressList"
This looked like the way to do it but it doesnt give the required result.
I was hoping to then go one to extract every 4th item starting from index 2 by changing the "from" number to 2, seemed logical but im obviously doing it wrong somehow.
The list is a list of strings. length of list is 13.
The blocks below return a list [1,5,9,13] that looks to be a list of the index's of the text items i wanted to add to the list.
Nishyanth your solution works but I maybe wasnt clear enough in my question.
Using a number list as you have is a better way to demonstrate it.
The tag2 list only held 13 items for test purposes so the results would be as below items but it would usually be much longer.
My first list I wanted to create would include the first item so not just [4, 8] but [1, 4, 8]
The second list I wanted to create would be [2, 5, 9, 13]
and third [3, 7, 11]
Hope this makes it clearer.