in reply to Re^2: Perlplexation - foreach shoulda Known (Rosetta: Perl, Python, Ruby)
in thread Perlplexation - foreach shoulda Known
eyepopslikeamosquito writes:
Curiously, this is very easy in Python...And Riales's task too: remember -- slices win ;-)
Then again, I'd argue that it's really not so curious given how much iteration support/use/avoidance is baked-in (iterator and sequence protocols, generators, comprehensions, slices, etc).for elem in some_iterable[::3]: do_something(elem)
In Section
Meditations