[Tutor] skip/slice more than every second?
questions anon
questions.anon at gmail.com
Tue Sep 29 05:54:44 CEST 2015
thankyou but I just realised I wrote the question wrong -
how do I do the inverse of above
so
hide 1 show 2,3,4 hide 5, show 6,7,8 etc.
thanks in advance
On Tue, Sep 29, 2015 at 1:33 PM, Sebastian Cheung <
sebastian_cheung at yahoo.com> wrote:
> print range(1,15,4)
>
> ans: [1, 5, 9,13]
>
>
>
> Sent from my iPhone
>
> > On 29 Sep 2015, at 04:16, questions anon <questions.anon at gmail.com>
> wrote:
> >
> > a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
> >
> > how can I show the first then skip three and show the next and so on?
> > For example:
> > show 1
> > then skip 2,3,4
> > then show 5
> > then skip 6,7,8
> > then show 9
> > then skip 10,11,12,
> >
> > etc.
> >
> > Any feedback will be greatly appreciated.
> > _______________________________________________
> > Tutor maillist - Tutor at python.org
> > To unsubscribe or change subscription options:
> > https://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list