def sum_of_all(list_of_nums: list):
    """adds all numbers in a list together and returns the sum"""
    sum_of_nums = 0
    for num in list_of_nums:
        sum_of_nums += num
    print(sum_of_nums)
    return sum_of_nums