How to retrive every third number from the List?

unhandled

(Probosciger) #1

Hello. Please watch my simple list
Screenshot_3
I want to retrive every third number from the List (0, 3, 6…)
How to make it?
Thanks


(qythium) #2

Dispatch component with True, False, False pattern.

Useful hack with character splitting and auto type conversions:


#3

nth_item_2018May7a

After all these years, I just realized why the various forms of Cull were so confusing to me when I started. With Cull Pattern you specify the indices you want to KEEP using ‘True’ or ‘1’, while with Cull Nth and Cull Index you specify the indices you want to REMOVE. :man_facepalming:

nth_item_2018May7c


(Probosciger) #4

wow thanks guys. my question solved using series node!


#5

The problem with Series here is that you need to:

  1. Pick a ‘Count (C input)’ value that is 1/3rd of the list length of the numbers you want to cull, rounded up to nearest integer (“Ceiling”).
  2. Set the ‘W’ (Wrap)’ input of List Item to false to avoid the duplicate values you see.
  3. Deal with any null values that sneak through.

That’s why Cull Pattern is better.


(Probosciger) #6

well… I agree. cull pattern works good