<jupyter_start><jupyter_text>2020년 9월 9일 수요일 leetCode - The K Weakest Rows in a Matrix (Python) 문제 : https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/ 블로그 : https://somjang.tistory.com/entry/leetCode-1337-The-K-Weakest-Rows-in-a-Matrix-Python  첫번째 시도<jupyter_code>class Solution:
    def kWeakestRows(self, mat: List[List[int]], k: int) -> List[int]:
        sum_nums = []
        for i in range(len(mat)):
            sum_nums.append((i, sum(mat[i])))
        sorted_sum_nums = sorted(sum_nums, key=lambda x: x[1])
        
        answer = [idx[0] for idx in sorted_sum_nums[:k]]
        
        return answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1437308868501529, 'fraction_numerical': 0.01834862385321101, 'mean_word_length': 3.09375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '414136', 'license': 'MIT', 'n_tokens_mistral': 275, 'n_tokens_neox': 277, 'n_words': 47, 'path': 'DAY 201 ~ 300/DAY203_[leetCode] The K Weakest Rows in a Matrix (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '654'}