class Solution:
def splitNum(self, num: int) -> int:
num = sorted(str(num))
num1, num2 = "", ""
for i in range(len(num)):
if i % 2:
num1 += num[i]
else:
num2 += num[i]
return int(num1) + int(num2)
or
class Solution:
def splitNum(self, num: int) -> int:
num = "".join(sorted(str(num)))
return sum(map(int, (num[::2], num[1::2])))