def mul(*args): # args as argument multiply = 1 for i in args: multiply *= i return multiply lst = [4,4,4,4] tpl = (4,4,4,4) print(mul(*lst)) # list unpacking print(mul(*tpl)) # tuple unpacking