[Tutor] Can you modify every nth item in a list with a single assignment?

Gus Tabares gus.tabares@verizon.net
Thu Jun 12 21:28:18 2003


>You're adding something to each member of a list, whereas the first
>example is modifying only specified members of another list, using the
>tuple of integers to specify which list elements are modified.  It
>probably would be possible to come up with something equivalent using
>map, lambda, and filter, but it'd be pretty ugly.

Aha! That's what I get for reading too quickly:) My fault, please disregard
my previous mail.


Sorry,
Gus




_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor