1 b ='upop.flt.cc' 2 d ='ccb.cc' 3 a = {'upop.flt.cc':('select upop',{'ccb.cc':'select ccb','icbc':'select icbc'})} 4 5 if d<>'': 6 if a.get(b): 7 ff = a.get(b)[1] 8 print ff.get(d) 9 else: 10 ww = a.get(b)[0] 11 print ww