From 4d0e0352cee0344f2b78b8040d610c74a4178416 Mon Sep 17 00:00:00 2001 From: Gyunseo Lee Date: Tue, 2 Jul 2024 23:32:20 +0900 Subject: [PATCH] 2024-07-02 23:32:20 Affected files: src/content/blog/leet-code-letter-combinations-of-a-phone-number.md --- ...eet-code-letter-combinations-of-a-phone-number.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/blog/leet-code-letter-combinations-of-a-phone-number.md b/src/content/blog/leet-code-letter-combinations-of-a-phone-number.md index d8fd541c3..84bf912da 100644 --- a/src/content/blog/leet-code-letter-combinations-of-a-phone-number.md +++ b/src/content/blog/leet-code-letter-combinations-of-a-phone-number.md @@ -46,15 +46,15 @@ digitAlphabetMap = { class Solution: def letterCombinations(self, digits: str) -> List[str]: - stringList = [] - combinationList = [] + string_list = [] + combination_list = [] for d in digits: - stringList.append(digitAlphabetMap[d]) - for comb in product(*stringList): + string_list.append(digitAlphabetMap[d]) + for comb in product(*string_list): if len(comb) == 0: continue - combinationList.append("".join(comb)) - return combinationList + combination_list.append("".join(comb)) + return combination_list ``` ## 다른 풀이 방법