self size - if self top nextself top self top next elseself top none return data elsereturn none the thing to pay attention to here is the inner if statement if the top node has its next attribute pointing to another nodethen we must set the top of the stack to now point to that nodewhen there is only one node in the stackthe pop operation will proceed as followsremoving such node results in self top pointing to none