I'd like to do something like the following:

a = 1; b = 2; c = None
mylist = [a, b, c]
for my in mylist:
    if my is None:
    print 'you have a problem with %s' % my         #this line is problematic

>>> You have a problem with None

What I want to see in the output is:
>>> You have a problem with c

How do I convert a variable name into a string?

thanks!

-- 
Stewart Midwinter
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to