Computer Science, asked by kristinasen166915, 8 hours ago

WAP to enter a four-digit number and print the sum of all its digits.
(IN PYTHON)

Answers

Answered by DragonPixie1309
1

Answer:

n = 1234

sum(map(lambda x: int(x), str(n)))

Similar questions