Dfs Algorithm In Python Using A Stack To Evaluate An Expression