📜  python代码示例中两个或多个数字的乘法

📅  最后修改于: 2022-03-11 14:45:12.443000             🧑  作者: Mango

代码示例1
# multiplication of two or more numbers
def multiple(*a):
    result = 1
    for i in a:
        result = result * i
    return result


# insert any number of arguments for multiplication, example:
res = multiple(12, 2, 5)
print(res)
# In this example, code output is = 120