Making variable from a variable

Polerio Babao Jr.II admin at polerio.com
Thu Oct 9 02:19:33 EDT 2003


I don't know if this question is easy or not but one thing I can say
is
I haven't encountered this problem yet in my entire python life. I
just opened
this question to the public because I've solved this kind of problem
already
before in my PHP life long time ago. I just want to know if it's also
possible in Python.
Any idea? Thanks.

in php

<?

$a = 'b';
${$a} = 'c';
print "$a $b";

?>

output is 

b c




More information about the Python-list mailing list