Oct-18-2022, 01:24 PM
I am getting a NameError that I do not understand.
It appears the function "combo" is defined in the proper place, so "combo not found" is puzzling to me.
It appears the function "combo" is defined in the proper place, so "combo not found" is puzzling to me.
class Solution(object): def combo(self, l1, l2): cs = [] for i in range(len(l1)): for j in range(len(l2)): cs.append(l1[i] + l2[j]) return cs def letterCombinations(self, digits): s = combo(["a", "b", "c"], ["d", "e", "f"]) return s
Error:NameError: global name 'combo' is not defined
s = combo(["a", "b", "c"], ["d", "e", "f"])
Line 16 in letterCombinations (Solution.py)
ret = Solution().letterCombinations(param_1)
Line 39 in _driver (Solution.py)
_driver()
Line 49 in <module> (Solution.py)