#prints the sum of any number def sum_of_digits(nums: int): nums=str(nums) sum = 0 for i in nums: sum+=int(i) return sum print(sum_of_digits(123)) #prints '6'. 1+2+3