Leetcode Solution Python Array Length