参考:
http://www.douban.com/group/topic/8563618/
a='abc'
b='def'
c='ghi'
t=a,b
for i in t:
if i == 'def':
for x, y in locals().items():
if i == y and x != 'i':
print x
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26250550/viewspace-1672548/
,如需转载,请注明出处,否则将追究法律责任。