Filter a list


    Dec 10 2013 | 6:55 pm
    Hi everybody,
    There is a way to filter a list as the following example ?
    mylist = 1 2 3 6 8 9 I just want to get numbers myresultlist = 1 2 3
    I think that tier can do the job, but I wondered if there is no zl function to do this in a better way ?
    Thanks.

    • Dec 10 2013 | 7:05 pm
      I mean tier not tier.
    • Dec 10 2013 | 7:06 pm
      Ouch, auto-correction. I mean ITER not TIER. (Sorry)
    • Dec 10 2013 | 8:59 pm
      Here's one way..
    • Dec 11 2013 | 5:19 pm
      Well, if you know that your list will not contain any zeros, this works:
    • Dec 11 2013 | 5:42 pm
      zl.sect might also be of help:
    • Dec 11 2013 | 6:17 pm
      Thank you so much guys, I will take a look and post the result asap.
    • Dec 11 2013 | 6:20 pm
      Here is yet another way using iter/zl.group: