Generate Binary Numbers Leetcode Python