Skip to content
loading...

re: Daily Challenge #142 - Parts of a Whole VIEW POST

FULL DISCUSSION
 

In Python.

def sum(num):
  nums = list(str(num))
  result = []

  for i in range(len(nums)):
    for j in range(len(nums)):
      if i < j:
        result.append(int(nums[i]) + int(nums[j]))


  return result
 
code of conduct - report abuse