for(each) element aliasing

Matija Papec mpapec at yahoo.com
Mon Nov 22 11:21:26 EST 2004


I know how to alter the list via list indicies but I would like to know if
there is posibility to write in Python something like:

my @arr = 1..3;
for my $element (@arr) {
  $element *= 2;
}
print "@arr\n";

and get the result
-------
2 4 6


-- 
Matija



More information about the Python-list mailing list