castironpi a écrit :
On Aug 23, 7:25 pm, Gandalf <[EMAIL PROTECTED]> wrote:how can I declare a variable with another variable name?for example I will use PHP: $a= "hello"; $a_hello="baybay"; print ${'a_'.$a) //output: baybay how can i do it with no Arrays using python thanks!Here's one idea.a= 'hello' a_hello= 'bayb' print eval( 'a_'+ a )bayb
Please avoid this kind of yucky ugly hacks. -- http://mail.python.org/mailman/listinfo/python-list