How to do this? - newbie

Ronald L. Dilsavor dilsavor at erinet.com
Thu Feb 10 17:31:01 CET 2000


Hi, 
I am new to python and am quite excited about it. I spent much of last night
writing my fist code snippet and I came across 1 thing which I could not
figure out how to do.

Suppose

>>> a=('x',1)
then how can I create an x of numerical type such that
>>> print x
1

 - just using manipulations of a = ('x',1)

Also let me know if this type of thing would not be considered best practice
in python. I thought I would need to make use of eval() but could not find
an incantation that would do it.

Thanks,
Ron




More information about the Python-list mailing list