<jupyter_start><jupyter_text>2020년 8월 29일 토요일 leetCode - Thousand Separator (Python) 문제 : https://leetcode.com/problems/thousand-separator/ 블로그 : https://somjang.tistory.com/entry/leetCode-1556-Thousand-Separator-Python  첫번째 시도<jupyter_code>class Solution:
    def thousandSeparator(self, n: int) -> str:
        if len(str(n)) < 4:
            return str(n)
        else:
            len_str = len(str(n))
            loop_num = len_str // 3
            
            mod_num_list = []
            
            for i in range(loop_num):
                n_mod_1000 = n % 1000
                
                if n_mod_1000 < 100:
                    mod_num_list.append('0' + str(n_mod_1000))
                else:
                    mod_num_list.append(str(n_mod_1000))
                
                n = n // 1000
            if n != 0:
                mod_num_list.append(str(n))
                
            mod_num_list_reverse = mod_num_list[::-1]
            
            answer = '.'.join(mod_num_list_reverse)
            
            return answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09825528007346189, 'fraction_numerical': 0.03948576675849403, 'mean_word_length': 1.3747276688453158, 'pattern_counts': {'":': 0, '<': 7, '<?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': '161673', 'license': 'MIT', 'n_tokens_mistral': 396, 'n_tokens_neox': 366, 'n_words': 59, 'path': 'DAY 101 ~ 200/DAY192_[leetCode] Thousand Separator (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '1089'}