Create Array Of Consecutive Numbers Leetcode Python