learned stack in pythonds