Question: Write a program in Python that given a list of positive integers, return another list where each element corresponds to the sum of the digits
Write a program in Python that given a list of positive integers, return another list where each element corresponds to the sum of the digits of the elements o#f the given list.
#Example:
# input
# alist=[124, 5, 914, 21, 3421]
# output
# sum=[7, 5, 14, 3, 18]
Step by Step Solution
3.25 Rating (160 Votes )
There are 3 Steps involved in it
To solve this problem you will write a Python program that processes a list of positive integers cal... View full answer
Get step-by-step solutions from verified subject matter experts
