"manstey" <[EMAIL PROTECTED]> wrote: > >If I have a string, how can I give that string name to a python object, >such as a tuple. > >e.g. > >a = 'hello' >b=(1234)
That's not a tuple. That's an integer. (1234,) is a tuple. >and then a function >name(b) = a > >which would mean: >hello=(1234) > >is this possible? Yes, but it's almost never the right way to solve your problem. Use an explicit dictionary instead. C:\Tmp>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a='hello' >>> locals()[a] = 1234 >>> hello 1234 >>> -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list