📅  最后修改于: 2022-03-11 14:46:44.241000             🧑  作者: Mango
number = 123 # the number you want to sum the digits of
sum_of_digits = sum(int(digit) for digit in str(number))
print(sum_of_digits)