s = temp_dict.pop(res) for i in temp_dict: if i in s: s = s.replace(i,temp_dict[i]) print(int(eval(s)))