Row Sum Print Leetcode Problems Python