Design Linked List Leetcode Solution Python