[Tutor] inquire

alan.gauld@bt.com alan.gauld@bt.com
Fri, 12 Jan 2001 10:37:32 -0000

> i.e. in foxpro, some code like following:
>             a="I am a"
>             b="a"
>             print &b
> may print the content of variable a.
> Can one do like this in python?

	print b 
would yield "a" and 
	print &b 
would yield the value of variable a?

If so then try:

>>> a = "I am a"
>>> b = "a"
>>> print b
>>> print eval(b)
I am a

Does that do?

Alan g.