Get parameter by name

Greg Ewing greg.ewing at compaq.com
Mon Nov 8 06:17:19 EST 1999


Oleg Broytmann wrote:
> 
>    x = "ka"
> 
> how can I get the value of parameter, the name of which is in x ("ka", in
> this case)?

   foo = locals()[x]

Greg




More information about the Python-list mailing list