Python List Assignment Error But Printing The Correct Result Stack

Python List Assignment Error But Printing The Correct Result Stack