Palindrome Linked List Leetcode Solution Python