add a function to compare python variable