How do I do this? (eval() on the left hand side)

It's me itsme at yahoo.com
Tue Dec 7 21:33:16 CET 2004


I am new to the Python language.

How do I do something like this:

I know that

    a = 3
    y = "a"
    print eval(y)

would give me a print out of 3 - but how do I do something to the effect of:

    eval(y) = 4    # hopefully the value of a gets changed to 4

??

Thanks,

--
It's me





More information about the Python-list mailing list