WAP to enter a four-digit number and print the sum of all its digits.
(IN PYTHON)
Answers
Answered by
1
Answer:
n = 1234
sum(map(lambda x: int(x), str(n)))
Similar questions