
    Given a list of user interaction scores where each score is a multi-digit number representing combined social activities (likes, comments, shares), create a function that calculates the engagement metric for each user by summing the individual digits of their score. For example, if a user has an interaction score of 234, their engagement metric would be 2+3+4=9.
    

    
def sum_of_digits(nums):
    """
    Given a list of user interaction scores where each score is a multi-digit number representing combined social activities (likes, comments, shares), create a function that calculates the engagement metric for each user by summing the individual digits of their score. For example, if a user has an interaction score of 234, their engagement metric would be 2+3+4=9.
    

    """
def sum_of_digits(nums):
    """
    Given a list of user interaction scores where each score is a multi-digit number representing combined social activities (likes, comments, shares), create a function that calculates the engagement metric for each user by summing the individual digits of their score. For example, if a user has an interaction score of 234, their engagement metric would be 2+3+4=9.
    

    """
    return sum((int(el) for n in nums for el in str(n) if el.isdigit()))