python 获取变量名的方法

参考:
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 
请使用浏览器的分享功能分享到微信等