def returnColor(value): print "-----STARTFUNC------" print value print value[1] print value[3] print value[4] print "---RESULTS---" if value[1] is value[3]: print "IPMATCH" color = "#e4e4e4" if value[1] is not value[3]: print "MISMATCH IP" color = "green" if value[4] is not value[3]: print "MISMATCH DNS" color = "blue" if value[1] is not value[3] and value[4] is not value[3]: print "MISMATCH IP/DNS" color = "orange" print "-----ENDFUNC----------" print "value = %s" % color print "======================" return color## OUTPUT SENT OUT #### ======================# -----STARTFUNC------# (30L, '10.10.10.10', 'dns.name.com', '10.10.10.10', '10.10.10.10')# 75.61.219.166# 75.61.219.166# 75.61.219.166# ---RESULTS---# MISMATCH IP# MISMATCH DNS# MISMATCH IP/DNS# -----ENDFUNC----------# value = orange