Leetcode In Order Traversal Python Snake Information