Length Of Last Word Leetcode Solution Python