Sum, Max, and Min Calculation on List Elements

  • Share this:

Code introduction


The function takes two lists as arguments, calculates the sum, maximum, and minimum of the elements in these lists, and then adds these three values together.


Technology Stack : Built-in functions sum(), max(), min()

Code Type : Function

Code Difficulty : Intermediate


                
                    
def abcd(arg1, arg2):
    def a():
        return sum(arg1)

    def b():
        return max(arg2)

    def c():
        return min(arg2)

    def d():
        return a() + b() + c()

    return d()