perl: ${$i) , python: ?

Maxes madmax at express.ru
Tue Jan 1 17:50:29 EST 2002


Hi all.

How to create variables with dynamic names ?
simple example on perl:
#! /usr/bin/perl
@kl=qw(t1 t2);
foreach $i (@kl) {
       ${$i}=3;
}
print "$t1 $t2\n";

#result would be "3 3"

b.r.
 Kozin Maxim



More information about the Python-list mailing list