Stack Implementation Using Linked List Geeksforgeeks Python Problem